// https://www.google.com/powermeter/feeds/user/01266859867152863645/01266859867152863645/variable/currentcost.envi.MyEnvi.d1
String subject = makeUserUrl() + "/variable/" + _variable;
String url = BASE_URL + "event";
RFC3339DateFormat idf = new RFC3339DateFormat();
int counter = 0;
for (PowerEvent event : events) {
String eventString = "";
Namespace meterNS = Namespace.getNamespace("meter", "http://schemas.google.com/meter/2008");
Element meterElement = new Element("entry");
meterElement.addNamespaceDeclaration(meterNS);
Element categoryElement = new Element("category");
categoryElement.setAttribute("scheme", "http://schemas.google.com/g/2005#kind");
categoryElement.setAttribute("term", "http://schemas.google.com/meter/2008#durMeasurement");
Element subjectElement = new Element("subject", meterNS);
subjectElement.setText(subject);
Element startElement = new Element("startTime", meterNS);
startElement.setAttribute("uncertainty", "1.0");
startElement.setText(idf.format(event.getStart()));
Element endElement = new Element("endTime", meterNS);
endElement.setAttribute("uncertainty", "1.0");
endElement.setText(idf.format(event.getEnd()));
Element quantityElement = new Element("quantity", meterNS);
quantityElement.setAttribute("uncertainty", "0.001");
quantityElement.setAttribute("unit", "kW h");
quantityElement.setText(event.getQuantity() + "");