Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <script src="loadxmldoc.js"> </script> </head> <body> <script> xmlDoc=loadXMLDoc("books_comment.xml"); x=xmlDoc.getElementsByTagName("book")[0].childNodes; for (i=0;i<x.length;i++) { if (x[i].nodeType==8) { //Process only comment nodes x[i].insertData(25,"Italian "); document.write(x[i].data); document.write("<br>"); } } </script> </body> </html>
Result:
W3Schools.com - Try it yourself