How do I insert one xmldom object to a node of another xmldom object in javascript?
Thanks in advance
How do I insert one xmldom object to a node of another xmldom object in javascript?
Thanks in advance
Just add the node where you want:
xmlDoc=loadXMLDoc("books.xml");
newNode=xmlDoc.createElement("book");
x=xmlDoc.documentElement;
y=xmlDoc.getElementsByTagName("book")[3];
x.insertBefore(newNode,y);