title: Load xml file using javascript
body: <p>Nothing gets printed on the web page when I try to open an HTML file having javascript. The script inside the html code loads the xml file and tries to print some element data. 
  I have pasted the code below. Sadly no data of file gets printed. I have used browsers IE8 and Chrome.  Please let me know what is the issue. </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;script&gt;
              function loadXMLDoc(dname)
              {
                  if (window.XMLHttpRequest)
                  {
                      xhttp=new XMLHttpRequest();
                  }
                  else
                  {
                      xhttp=new ActiveXObject("Microsoft.XMLDOM");
                  }
  
                  xhttp.open("GET",dname,false);
                  xhttp.send();
                  return xhttp.responseXML;
              }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;script&gt;
              xmlDoc=loadXMLDoc("file:///E:/Parser/book.xml");
  
              document.write(xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue + "   &lt;br&gt;");
              document.write(xmlDoc.getElementsByTagName("authors")[0].childNodes[0].nodeValue + "&lt;br&gt;");
  
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>