I have the following jQuery
$.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);
});
}
Trying to read data from this XML file
You can also see a live jsFiddle here
For 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.
http://f.cl.ly/is a third party domain.http://f.cl.ly/you cannot send AJAX requests to it.errorcallback and investigate the Ajax error you get.f.cl.lyand your updated jsfiddle doesn't work because you are getting a 404 error. Please use FireBug to see those errors. So as everyone already stated here: you cannot send cross domain AJAX calls.