title: How do I define the filepath to an XML file in JScript
body: <p>I am trying to import data from an XML file.
  The code I am using is saved as an HTML file in the same directory as the XML file.
  However, the code fails to read the xml file. I am not certain I have defined the path to the file correctly.
  My code is as follows;</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;title&gt;XML Data Download&lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;script&gt;
  alert("Help");
  
      if (window.XMLHttpRequest) {
          // code for modern browsers
          xmlhttp = new XMLHttpRequest();
       } else {
          // code for old IE browsers
          xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } 
  
      xhttp.open("GET", "Players.xml", false);
      alert("help2");
      xhttp.send();
      var xmlDoc = xmlhttp.responseXML;
  
      document.write("&lt;table border='1'&gt;");
      var x = xmlDoc.getElementsByTagName("Player");
      for (i - 0; i&lt; x.length; i++) {
          alert(x.length);
          document.write("&lt;tr&gt;&lt;td&gt;");
          document.write(x[i].getElementsByTagName("Name")[0].childNodes[0].nodeValue);
          document.write("&lt;/td&gt;&lt;td&gt;");
          document.write(x[i].getElementsByTagName("TeleNo")[0].childNodes[0].nodeValue);
          document.write("&lt;/td&gt;&lt;/tr&gt;");
      }
      document.write("&lt;/table&gt;");
  
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have used 2 alert messages to show where the code fails. The first alert message works but the second [alert("help2");] message does not show. This is following [ xhttp.open("GET", "Players.xml", false);]
  Ant ideas why the file is not being read?
  The XML file work okay in a VB.Net application I have written.</p>