This code is from Prototype.js. I've looked at probably 20 different tutorials, and I can't figure out why this is not working. The response I get is null.
new Ajax.Request( /path/to/xml/file.xml, {
method: "get",
contentType: "application/xml",
onSuccess: function( transport ) {
alert( transport.responseXML );
}
});
If I change the responseXML to responseText, then it alerts to me the XML file as a string. This is not a PHP page serving up XML, but an actual XML file, so I know it is not the response headers.
Edit: You are indeed correct -- I did not close off one of my XML nodes, and it was therefore not valid, which gave the null -- thanks!