Returns an XML string of the node Set.

@param nodes the Set to create xml for.
@return an XML string of the node Set.
@throws IOException an IOException.
513960
private String genXML(Set nodes) throws IOException {
        Iterator it = nodes.iterator();
        StringBuffer buf = new StringBuffer(1024);
        buf.append(StateHelper.XML_DOC_START);
        buf.append(getSynchInterval());
        buf.append(StateHelper.XML_DOC_START_END);
        while (it.hasNext()) {
            Node n = (Node) it.next();
            buf.append(StateHelper.XML_NODE_TAG_START);
            buf.append(StateHelper.encodeMACAddress(n.getNodeIdentifier()));
            buf.append(StateHelper.XML_NODE_TAG_AFTER_ID);
            buf.append(n.getClockSequence());
            buf.append(StateHelper.XML_NODE_TAG_AFTER_CSEQ);
            buf.append(n.getLastTimestamp());
            buf.append(StateHelper.XML_NODE_TAG_END);
        }
        buf.append(StateHelper.XML_DOC_END);
        return buf.toString();
    }
982492
public java.lang.String getXmlns() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.xmlns);

    }
1224451
public void xml(String xml) {
    if (LogLevel.DEBUG < logConfiguration.logLevel) {
      return;
    }
    printlnInternal(LogLevel.DEBUG, logConfiguration.xmlFormatter.format(xml));
  }
1283893
private String createXML(NodeConfig node) {
		class XMLCreator extends XmlMarshaller {
			public XMLCreator(NodeConfig node) {
				super(node);
			}

			public String print() {
				try {
					return super.marshal().toString();
				} catch (MarshalException e) {
					return "";
				}
			}
		}
		XMLCreator creator = new XMLCreator(node);
		return creator.print();
	}
643352
public static String toXML(final Node aNode) throws TransformerException {
        try {
            final TransformerFactory transFactory = TransformerFactory.newInstance();
            final Transformer transformer = transFactory.newTransformer();
            final StringWriter buffer = new StringWriter();
            final DOMSource domSource = new DOMSource(aNode);
            final StreamResult streamResult = new StreamResult(buffer);
            final String omitDeclaration = OutputKeys.OMIT_XML_DECLARATION;

            transformer.setOutputProperty(omitDeclaration, "yes");
            transformer.transform(domSource, streamResult);

            return buffer.toString();
        } catch (final TransformerConfigurationException details) {
            throw new I18nRuntimeException(details);
        }
    }
28006
public String createQueryStringFromNode(Node node, @Nullable Class<?> domainType) {
		return createQueryStringFromNode(node, 0, domainType);
	}
336290
public static String nodeToString(Node document) throws Exception {
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

        Source xmlSource = new DOMSource(document);
        Result outputTarget = new StreamResult(outputStream);
        Transformer transformer = TransformerFactory.newInstance().newTransformer();
        transformer.transform(xmlSource, outputTarget);

        return outputStream.toString();
    }
1323148
public static Map<String, Object> toMap(String xml){
        xml = xml.replaceAll("(\\r|\\n)", "");
        if (Strings.isNullOrEmpty(xml)){
            return Collections.emptyMap();
        }
        XmlReaders readers = XmlReaders.create(xml);
        return toMap(readers);
    }
1238584
public String toXML() {
        StringBuilder sb = new StringBuilder();
        sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
        toXML(sb, 0);
        return sb.toString();
    }
272639
public static String getNodeAttrText(Node node, String attrName) {
        Node fieldNode = node.selectSingleNode(attrName);
        return XmlNodeHelper.getNodeText(fieldNode);
    }
32391
public NodeIterator nodeset() throws javax.xml.transform.TransformerException
  {
    return new org.apache.xml.dtm.ref.DTMNodeIterator(iter());
  }
1247984
public Collection<Xml> getChildren()
    {
        final Collection<Xml> nodes = new ArrayList<>(1);
        final NodeList list = root.getChildNodes();
        for (int i = 0; i < list.getLength(); i++)
        {
            final Node node = list.item(i);
            if (node instanceof Element)
            {
                nodes.add(new Xml(document, (Element) node));
            }
        }
        return nodes;
    }
472298
public Map<String, Collection<String>> getRoles(final Node node) {
        return getAgentRoles(nodeConverter.convert(node));
    }
515079
public Set<String> getAllNodeIDs() {
		HashSet<String> ids = new HashSet<>(nodes.keySet());
		ids.add(nodeID);
		return ids;
	}
145004
public static String mapXMLToObject(String xml) {
		for (int i = 0; i < keyWordMapping.length; i++) {
			if (keyWordMapping[i][0].equalsIgnoreCase(xml)) {
				return keyWordMapping[i][1];
			}
		}
		return xml;
	}
1065940
private NodeSet<OWLClass> nodesToOwlClassNodeSet(Set<au.csiro.ontology.Node> nodes) {
        Set<Node<OWLClass>> temp = new HashSet<Node<OWLClass>>();
        for (au.csiro.ontology.Node n : nodes) {
            temp.add(nodeToOwlClassNode(n));
        }
        return new OWLClassNodeSet(temp);
    }
1191684
public Node getDOM()
    {
        Object root = m_message.getRawData();
        try {
            String strSOAPPackage = (String)((TrxMessageHeader)this.getMessage().getMessageHeader()).get(SOAPMessageTransport.SOAP_PACKAGE);

            Node node = null;            
            DocumentBuilder db = Util.getDocumentBuilder();
            Document doc = db.newDocument();            
            
            Marshaller m = JaxbContexts.getJAXBContexts().getMarshaller(strSOAPPackage);
            if (m == null)
                return null;
            synchronized(m)
            {   // Since the marshaller is shared (may want to tweek this for multi-cpu implementations)
                m.marshal( root, doc );
            }
            node = doc.getDocumentElement();

            if (node != null)
                return node;
        } catch (JAXBException ex)   {
            ex.printStackTrace();
        } catch (java.lang.IllegalArgumentException ex)   {
            ex.printStackTrace();
        }
        return super.getDOM();
    }