Java examples for XML:XML Node Operation
import XML Document To Node
//package com.java2s; import org.w3c.dom.Document; import org.w3c.dom.Node; public class Main { public static Node importDocumentToNode(Node nodeOutput, Document docInput) {/*from ww w. j a va 2s. c o m*/ Node nodeInput = docInput.getDocumentElement(); Node nodeImported = nodeOutput.getOwnerDocument().importNode( nodeInput, true); nodeOutput.appendChild(nodeImported); return nodeOutput; } }