Is the use of XML a requirement for your project? It is always *much* easier to work with JSON data instead of XML, and for a large dataset it's much faster too.
It may be a moot point since you have the XML working now, but let me know if you'd like an example of how to do this with JSON. You'll be pleasantly surprised by how much simpler it is. -Mike On Fri, Jun 4, 2010 at 4:33 AM, Sivakanesh <[email protected]> wrote: > Thanks Andrew, I'm now using getElementsByTagName. And change my XML > a bit to use attribute elements more. Work well now. > > > On Jun 4, 11:09 am, Andrew Leach <[email protected]> wrote: > > On Jun 4, 10:38 am, Sivakanesh <[email protected]> wrote: > > > > > > > > > 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: > > > > > Uncaught TypeError: Cannot read property 'nodeName' of undefined - > > > line 29 > > > > Firebug is slightly more useful: > > y[i].childNodes[0].childNodes[0] has no propertieshttp:// > domain2405544.sites.fasthosts.com/test/test1.htm > > Line 30 > > > > i is 1. In Firefox (and probably Chrome), childNodes[0] is "\n". IE > > and other browsers enumerate the nodetree differently. You probably > > want to use getElementsByTagName() to be sure of what elements you are > > dealing with, or be far more rigorous in your examination of nodeType. > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps API" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-maps-api%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-api?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
