Copy one XML document to another using the DOM

this is my situation:

I have two org.w3c.dom.Document generated from two xml files. I want to get a new document containing all the data of two XML documents.

Do you have any ideas on how to do this?

Thanks! Rob

0


a source to share


1 answer


  • create a new document
  • create a new root named newRoot
  • add the first document root as a child of newRoot
  • add the second document root as a child of newRoot


+2


a source







All Articles