xmlHttp and responseXML

Often folks trip on a simple thing like not sending the correct headers...one case where most stumble in the absence of a framework which requires you to define the content type is responseXML fails on Ajax Calls.
When we send response of an ajax request as XML we need to ensure that the content type is properly defined as "text/xml" failing which the responseXML method returns null. (note the responseText still works fine)

Comments

Popular Posts