Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <script src="loadxmldoc.js"> </script> </head> <body> <script> xmlDoc=loadXMLDoc("books.xml"); x=xmlDoc.getElementsByTagName("book")[0]; document.write("Before: "); document.write(x.textContent); document.write("<br>"); x.textContent="hello"; document.write("After: "); document.write(x.textContent); </script> </body> </html>
Result:
W3Schools.com - Try it yourself