I’m building out a simple search tool. The back end in XML, the front end javascript/jquery. It works fine locally, but when I moved the file to the test server the xml file could no longer be found, even though the path and file orientation is the same.
I’ve tried different ways of accessing the file (.ajax, .get, etc) with no luck. Even if I try just plugging the xml path directly into the address window I am given the same error: “The resource could not be found”. I have verified, the xml is well-formed… pretty much stumped from there.
I suspect this is something to do with the webconfig file (server is iis/asp.net, I have no access to lower-level config), but this is just a guess as I have little experience in that particular arena.
Much thanks for any help on this one!
Here’s the two versions of the jQuery xml retreival mechanisms I’ve tried. Neither work.
v1 >
$.get('data.xml', function(xml){...}); /*no dice*/
v2 >
$.ajax({
type: "GET",
url: "data.xml",
dataType: "xml",
success: function(xml) {
$(xml).find('facility').each(function(){...}
}; /* also, no dice*/
Turns out the server admins had to disabled the XML handlers on the root level of the website. Not sure what that means, exactly, but the problem is now resolved.
Thanks to all for your help!