Next freebie in 28 Hours*
<?xml version="1.0" encoding="UTF-8" ?>
xhttp = new XMLHttpRequest();
xhttp = new ActiveObject("Microsoft.XMLHTTP);
xhttp.open('GET', path, false);
xml = loadXML("flightbooking.xml");
We have written a function that will load the XML document, given the URL to locate it. The call to the function is made, and the string return type stored. The document will be finally displayed in the browser window. But we don't get what we expect (you can verify that from the tutorial or your own script,) mainly because the root level XML element is the entire document node (root node of the DOM tree) and it's not a simple node; it has nested elements.
In the next summary, we'll see how to use looping constructs to return selective information stored in the retrieved from the XML document. Until then, goodbye!
Have a question but don't want to ask it publicly? If you are a prime member just ask right here and we will get back to you within 48 hours. Not prime yet? no worries you can ask publicly below.