Element metric = doc.createElement("metric");
metric.setAttribute("property", property);
metric.setAttribute("displayName", displayName);
metric.setAttribute("displayType", managedAttr.displayType().toString());
metric.setAttribute("dataType", managedAttr.dataType().toString());
metric.setAttribute("units", managedAttr.units().toString());
metric.setAttribute("description", managedAttr.description());
parent.appendChild(metric);
}