I've got an ajax call that reads a xml response as such:
var xmlDoc = request.responseXML;
var responseNode = xmlDoc.documentElement;
foo(responseNode);
What would I test to see if responseNode was properly formatted XML? Sometimes, the php script will echo an error that's not xml formatted...so I'd like this test to basically output anything that's not proper xml to an alert box.
var xmlDoc = request.responseXML;
var responseNode = xmlDoc.documentElement;
foo(responseNode);
What would I test to see if responseNode was properly formatted XML? Sometimes, the php script will echo an error that's not xml formatted...so I'd like this test to basically output anything that's not proper xml to an alert box.