0

I would like to add complete NodeList into xml document:

I get my NodeList from document1 as follow:

NodeList myNList=doc1.getElementsByTagName("APPLICATION");

This nodeList contains some nodes with many attributes and I would like to insert this nodeList into other document doc2 in node USER with the name "Nina"

doc2.xml:

<document>
<USER name="Nina">
// nodeList should be inserted here
</USER>

What is the best way do do this without having to create new elements/nodes in doc2?

Ronald
  • 2,721
  • 8
  • 33
  • 44
  • Possible duplicate of [Create XML document using nodeList](https://stackoverflow.com/questions/5786936/create-xml-document-using-nodelist) – Rupesh Chaudhari Jul 10 '19 at 07:55
  • this is not duplicate I don't need to create new element all elemnets are there I just need to insert nodelist into already existing node – Ronald Jul 10 '19 at 08:23

0 Answers0