Node root = document.createElement("users");
// a <user id="foo" password="bar"> for each group
for (Iterator i = propertySets.keySet().iterator(); i.hasNext();) {
String userKey = i.next().toString();
XMLPropertySet ps = (XMLPropertySet) propertySets.get(userKey);
//Node user = createElement("user").addAttribute("id", userKey);
Node userNode = new Node();
root.appendChild(userNode);
log.debug(ps.saveToDocument().toString());
//userElement.add(ps.saveToDocument().toString());
}
// print it nicely
OutputFormat format = OutputFormat.createPrettyPrint();