in reply to Re^6: Copy portion of XML elements from one XML file to another exiting XML file
in thread Copy portion of XML elements from one XML file to another exiting XML file

Sorry, but teaching how the DOM works and how to apply the methods is far beyond what I can do for you.

Your proposed code seems to confuse the source and destination. At least to me it appears that you are taking the elements of the target document and the elements you want to copy to the target document. ->setOwnerDocument needs to be called on nodes that have been removed from another document. Most likely, this would be called on nodes from your source document and not nodes in your target document.

  • Comment on Re^7: Copy portion of XML elements from one XML file to another exiting XML file
  • Download Code