title: Chrome says Cannot read property 'nodeName' of undefined, IE6 is fine, using Google Map API
body: <p>I have an XML file in the following structure.</p>
  
  <pre><code>&lt;NewDataSet&gt;
   &lt;markers&gt;
    &lt;name&gt;name text&lt;/name&gt;
    &lt;desc&gt;desc text&lt;/desc&gt;
    &lt;Lat&gt;57.149328033771&lt;/Lat&gt;
    &lt;Long&gt;-2.12561060173764&lt;/Long&gt;
    &lt;cost&gt;9985&lt;/cost&gt;
   &lt;/markers&gt;
  &lt;/NewDataSet&gt;
  </code></pre>
  
  <p>I'm using Google Map API to parse and map these, using the following Javascript.</p>
  
  <pre><code> function load() {
    if (GBrowserIsCompatible()) {
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(47.614495, -122.341861), 13);
  
      GDownloadUrl("test1.xml", function(data) {
          var xml = GXml.parse(data);
          x= xml.documentElement;
          y = xml.documentElement.childNodes;
          alert(y.length);
          for (i=0;i&lt;y.length;i++)
          {
              if (y[i].nodeType!=3)
              {
                alert(y[i].childNodes[0].nodeName + " : " + y[i].childNodes[0].childNodes[0].nodeValue); //name
              }
          }
  
      });
    }
  }
  </code></pre>
  
  <p>Both the full xml and html files can be downloaded here:
  <a href="http://domain2405544.sites.fasthosts.com/test/test1.htm" rel="nofollow noreferrer">http://domain2405544.sites.fasthosts.com/test/test1.htm</a>
  <a href="http://domain2405544.sites.fasthosts.com/test/test1.xml" rel="nofollow noreferrer">http://domain2405544.sites.fasthosts.com/test/test1.xml</a></p>
  
  <p>First off, I'm just trying to parse this data.  Works fine in IE6 (no choice with that) and it alerts the data correctly.  However when I load the same page in Chrome is tells me:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'nodeName' of undefined - line 29
  </code></pre>
  
  <p>I'm using identical files, so may be there is an underlying problem I just can't see.
  Has anyone got any ideas why this may be happening?</p>
  
  <p>Thanks  </p>