function loadXMLDoc(dname)
if (window.XMLHttpRequest)
xhttp=new XMLHttpRequest();
xhttp=new ActiveXObject("Microsoft.XMLHTTP");
xhttp.open("GET",dname,false);
return xhttp.responseXML;
xml=loadXMLDoc("/statics/demosource/books.xml");
path="/bookstore/book[price>35]/price";
if (window.ActiveXObject)
var nodes=xml.selectNodes(path);
for (i=0;i<nodes.length;i++)
document.write(nodes[i].childNodes[0].nodeValue);
else if (document.implementation && document.implementation.createDocument)
var nodes=xml.evaluate(path, xml, null, XPathResult.ANY_TYPE,null);
var result=nodes.iterateNext();
document.write(result.childNodes[0].nodeValue);
result=nodes.iterateNext();