Besides the cross-domain issues already mentioned, responseXML
requires completely valid XML and probably the correct Content-Type
in the response headers sent from the server. It is very unlikely that either of these requirements would be met by the average website.
For the latter issue, you can use
xmlhttp.overrideMimeType('application/xml');
before you send the request to force the response to be interperted as XML. Still if the response is not valid XML, you will only get null
.