code: public static Node copyTreeToNode(Node tree, Node node)
      {
          DOMResult result = new DOMResult(node);
          if (Utility.copyTreeToResult(tree, result))
              return node.getLastChild();
          else
              return null;    // Failure
      }
docs: Copy DOM tree to a SOAP tree.
  @param tree
  @param node
  @return The parent of the new child node.