Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <script src="loadxmlstring.js"></script> </head> <body> <script> text="<bookstore><book>"; text=text+"<title>Everyday Italian</title>"; text=text+"<author>Giada De Laurentiis</author>"; text=text+"<year>2005</year>"; text=text+"</book></bookstore>"; xmlDoc=loadXMLString(text); document.write(xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue); document.write("<br>"); document.write(xmlDoc.getElementsByTagName("author")[0].childNodes[0].nodeValue); document.write("<br>"); document.write(xmlDoc.getElementsByTagName("year")[0].childNodes[0].nodeValue); </script> </body> <!-- Mirrored from www.w3schools.com/dom/tryit.asp?filename=try_dom_parsertest2 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:26:34 GMT --> </html>
Result:
Try it Yourself - © w3schools.com