for (String pid : new TreeSet<String>(configuration.keys())) {
writer.writeStartElement(Element.CONFIGURATION.getLocalName());
writer.writeAttribute(Attribute.PID.getLocalName(), pid);
ModelNode properties = configuration.get(pid).get(ENTRIES);
for (String propKey : properties.keys()) {
String value = properties.get(propKey).asString();
writer.writeStartElement(Element.PROPERTY.getLocalName());
writer.writeAttribute(Attribute.NAME.getLocalName(), propKey);
writer.writeCharacters(value);
writer.writeEndElement();