jQuery Pass XML Ajax

nancyfern

New Member
I have the following jQuery\[code\]$.ajax({ type: "GET", url: "http://f.cl.ly/items/0i1V1L1k2F440L1m2Y0G/pointdata.xml", dataType: "xml", success: parseXml});function parseXml(xml) { $(xml).find('point').each(function() { var lat = $(this).children('lat').text(); var long = $(this).children('long').text(); alert(lat + long); });}\[/code\]Trying to read data from this XML fileYou can also see a live jsFiddle hereFor some reason, the variables lat and long aren't being assigned for each element. What am I doing wrong? Any help would be much appreciated. Thanks in advance.?
 
Back
Top