[Greasemonkey] responseXML for GM_xmlhttpRequest

Lenny Domnitser ldrhcp at gmail.com
Wed Jul 6 00:56:17 EDT 2005

This hack works around the security restrictions of GM_xmlhttpRequest
and implements responseXML.

function getResponseXML() {
  if(this._responseXML) {
    return this._responseXML;
  return this._responseXML = new DOMParser().parseFromString(this.responseText,
      'text/xml'); // not sure if this should be application/xml
                   // text/html is used for compatibility with
                   // normal XMLHttpRequest
responseState.responseXML getter = getResponseXML;

More information about the Greasemonkey mailing list