0
Comment insérer un objet xmldom dans un noeud d'un autre objet xmldom dans javascript?Comment insérer un objet xmldom dans un noeud d'un autre objet xmldom dans javascript
Comment insérer un objet xmldom dans un noeud d'un autre objet xmldom dans javascript?Comment insérer un objet xmldom dans un noeud d'un autre objet xmldom dans javascript
Il suffit d'ajouter le nœud où vous voulez:
xmlDoc=loadXMLDoc("books.xml");
newNode=xmlDoc.createElement("book");
x=xmlDoc.documentElement;
y=xmlDoc.getElementsByTagName("book")[3];
x.insertBefore(newNode,y);