public static void write(OutputNode parent, Element domElement) throws Exception { OutputNode child = parent.getChild(domElement.getNodeName()); child.getNamespaces().setReference(domElement.getNamespaceURI(), domElement.getPrefix()); child.setValue(domElement.getTextContent()); child.commit(); } }
/** * This is use to apply for <code>NamespaceList</code> annotations * on the node. If there is no namespace list then this will return * and the node will be left unchanged. If however the namespace * list is not empty the the namespaces are added. * * @param node this is the node to apply the namespace list to */ private void scope(OutputNode node) { NamespaceMap map = node.getNamespaces(); for(Namespace next : scope) { String reference = next.reference(); String prefix = next.prefix(); map.setReference(reference, prefix); } }
/** * This is use to apply for <code>NamespaceList</code> annotations * on the node. If there is no namespace list then this will return * and the node will be left unchanged. If however the namespace * list is not empty the the namespaces are added. * * @param node this is the node to apply the namespace list to */ private void scope(OutputNode node) { NamespaceMap map = node.getNamespaces(); for(Namespace next : scope) { String reference = next.reference(); String prefix = next.prefix(); map.setReference(reference, prefix); } }
/** * This is use to apply for <code>NamespaceList</code> annotations * on the node. If there is no namespace list then this will return * and the node will be left unchanged. If however the namespace * list is not empty the the namespaces are added. * * @param node this is the node to apply the namespace list to */ private void scope(OutputNode node) { NamespaceMap map = node.getNamespaces(); for(Namespace next : scope) { String reference = next.reference(); String prefix = next.prefix(); map.setReference(reference, prefix); } }