I use this implementation to add Node from one XML document to other.
Node firstDocImportedNode = firstDoc.importNode(secondDocsNode, true);
firstDocNode.appendChild(firstDocImportedNode );
See if this helps. Trick is just importing a Node to other Document, instead of directly appending.