hi guys, I'm kind of new with xml. I have an xml file in the following format, with 592 records:
<?xml version="1.0" encoding="ISO-8859-1"?>
<data>
<item>
<buildingName>Chateau</buildingName>
<address>81 North Broadway, White Plains, NY</address>
<mail>I</mail>
<laundry>I</laundry>
<garbage>I</garbage>
<parking>I</parking>
<rating>No Access</rating>
<municipality>White Plains</municipality>
</item>
<item>
<buildingName>44 Franklin Avenue</buildingName>
<address>44 Franklin Avenue, New Rochelle, NY</address>
<mail>A</mail>
<laundry>A</laundry>
<garbage>A</garbage>
<parking>A</parking>
<rating>Good Access</rating>
<municipality>New Rochelle</municipality>
</item>
</data>
I'm using the following code in order to read all the addresses:
var xml = GXml.parse(data); //this function is from google map API
var addresses =xml.documentElement.getElementsByTagName("address");
for (var i = 0; i < addresses.length; i++) {
showAddress(addresses[i].childNodes[0].nodeValue);
}
There are 592 records, but I'm only being able to read 74!!!!! Why is that? Any help will be greatly appreciate it. Thank you