import XML Node To Node - Java XML

Java examples for XML:XML Node Operation

Description

import XML Node To Node

Demo Code


//package com.java2s;

import org.w3c.dom.Node;

public class Main {
    public static Node importNodeToNode(Node nodeOutput, Node nodeInput) {

        Node nodeImported = nodeOutput.getOwnerDocument().importNode(
                nodeInput, true);//  www  .j  a  v  a  2 s  .c  o  m
        nodeOutput.appendChild(nodeImported);
        return nodeOutput;
    }
}

Related Tutorials