}
if (has(node, ModelConstants.CAPABILITY)) {
writer.writeStartElement(Element.CAPABILITIES.getLocalName());
ModelNode modules = node.get(ModelConstants.CAPABILITY);
for (String key : modules.keys()) {
ModelNode moduleNode = modules.get(key);
writer.writeEmptyElement(Element.CAPABILITY.getLocalName());
writer.writeAttribute(Attribute.NAME.getLocalName(), key);
if (moduleNode.has(ModelConstants.STARTLEVEL)) {
writeAttribute(writer, Attribute.STARTLEVEL, moduleNode.require(ModelConstants.STARTLEVEL));