title: Can't output xPath data using Javascript in Firefox
body: <p>I'm suffering from a huge dilemna and cannot for the life of me, work out what I have done wrong :S
  I have written several other code for other projects which do exactly the same thing - Output a table displaying data from an XML file, but for this project it just does not work!</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;html&gt;
  
  &lt;body&gt;
  &lt;script type="text/javascript"&gt;
  
  function loadXMLDoc(dname)
  {
  if (window.XMLHttpRequest)
    {
    xhttp=new XMLHttpRequest();
    }
  else
    {
    xhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xhttp.open("GET",dname,false);
  xhttp.send("");
  return xhttp.responseXML;
  }
  
  xml=loadXMLDoc("AH_vic.xml");
  var aname="/AirportHeliport/timeSlice/AirportHeliportTimeSlice/name";
  var acoord="/AirportHeliport/timeSlice/AirportHeliportTimeSlice/ARP/ElevatedPoint/gml:coordinates";
  
  
  if (typeof xml.evaluate !== 'undefined') 
  {
    var result = xml.evaluate(
     aname, 
     xml,
     function (prefix) {
       if (prefix === 'gml') {
         return 'http://www.opengis.net/gml/3.2';
       }
  
       else {
         return null;
       }
     },
     XPathResult.ANY_TYPE,
     null
    );
  
    var result2 = xml.evaluate(
     acoord, 
     xml,
     function (prefix) {
      if (prefix === 'gml') {
         return 'http://www.opengis.net/gml/3.2';
       }
  
       else {
         return null;
       }
     },
     XPathResult.ANY_TYPE,
     null
    );
  
    // now use the code here you already have in your sample for evaluate
    var nodes=xml.evaluate(
     aname,
     xml,
     function (prefix) {
   if (prefix === 'gml') {
         return 'http://www.opengis.net/gml/3.2';
       }
  
       else {
         return null;
       }
  
  
     },
     XPathResult.ANY_TYPE,
     null);
  
    var nodes2=xml.evaluate(
     acoord,
     xml,
     function (prefix) {
       if (prefix === 'gml') {
         return 'http://www.opengis.net/gml/3.2';
       }
  
       else {
         return null;
       }
  
     },
     XPathResult.ANY_TYPE,
     null);
  
  
  
  
  
  var aname2=nodes.iterateNext();
  var acoord2=nodes2.iterateNext();
  
  
  //document.write(aname2.childNodes[0].nodeValue());
  
  
  
  
  document.write("&lt;table border=2&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Coordinates&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;");
  while (aname2)
    {
  
    document.write("&lt;tr&gt;&lt;td&gt;");
    document.write(aname2.childNodes[0].nodeValue);
  
    document.write("&lt;br /&gt;&lt;td&gt;");
  
    document.write(acoord2.childNodes[0].nodeValue);
    document.write("&lt;br /&gt;&lt;td&gt;");
  
  
  
    aname2=nodes.iterateNext();
    acoord2=nodes2.iterateNext();
  
    }
    document.write("&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;");
  
  }
  
  
  else if (typeof xml.selectNodes !== 'undefined' &amp;&amp; typeof xml.setProperty != 'undefined') 
  {
    //xml.setProperty('SelectionLanguage', 'XPath');
    //xml.setProperty('SelectionNamespaces', 'xmlns:gml="http://www.opengis.net/gml/3.2"');
    var nodes = xml.selectNodes(aname);
    var nodes2 = xml.selectNodes(acoord);
    // now use the code you already have for selectNodes
  
  
  
  document.write("&lt;table border=2&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Coordinates&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;");
  
  for (i=0;i&lt;nodes.length;i++)
    {
    document.write("&lt;tr&gt;&lt;td&gt;");
    document.write(nodes[i].childNodes[0].nodeValue);
    document.write("&lt;/td&gt;&lt;td&gt;");
    document.write(nodes2[i].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>The Internet explorer part (for loop towards the end) works flawlessly. I understand that IE code is not dependant on namespace(s)(URL's), but the namespace and namespace URL is perfect in the XML file from which I am extracting them from.
  Path is perfect as it works in IE.
  Running it in Firefox and observing the developer console, if we try to print out aname2, so document.write(aname2.childNodes[0].nodeValue); It reports that aname2 = null...</p>
  
  <p>Any help would be much appreciated! I am from Australia and will gladly shout you's a drink or a ps3 or something =)</p>