hi, i'm trying to figure out how to modify the following code:

GDownloadUrl("data.xml", function(data, responseCode) {
  var xml = GXml.parse(data);
  var markers = xml.documentElement.getElementsByTagName("marker");
  for (var i = 0; i < markers.length; i++) {
    var point = new GLatLng(parseFloat(markers[i].getAttribute
("lat")),
                            parseFloat(markers[i].getAttribute
("lng")));
    map.addOverlay(new GMarker(point));
  }
});


so that i can properly parse an XML file with this format (note the
attributes):
<example>
    <event id="14420976">
        <param name="latitude" value="33.5853"/>
        <param name="longitude" value="-116.6166"/>
    </event>
</example>


i realize this is probably a result of my inexperience with parsing
XML, but any help would be appreciated. thanks!

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to