Java examples for XML:XML Node Operation
import XML Node To Document
//package com.java2s; import org.w3c.dom.Document; import org.w3c.dom.Node; public class Main { public static Document importNodeToDocument(Document docOutput, Node nodeInput) {/*from w w w . ja v a2s .c om*/ Node nodeImported = docOutput.importNode(nodeInput, true); docOutput.getDocumentElement().appendChild(nodeImported); return docOutput; } }