Loading xml with Jquery - why doesn't this work
- by es11
I have regular javascript code and am trying to utilize JQuery just to load and parse an xml file. I have the following:
function loadXml() {
$(function() {
$.ajax({
type: "GET",
url: "my_file.xml",
dataType: "xml",
success: parseXml
});
});
}
function parseXml() {
alert("Parsing...");
}
When calling loadXml I cannot get the callback success function to execute. I am running this all locally and my_file.xml resides in the same directory as this javascript. Any ideas?