[Greasemonkey] responseXML missing from GM_xmlhttpRequest?

Erik Kastner kastner at gmail.com
Wed May 4 09:14:03 EDT 2005


Since this is such a "big" thing - could there be a flag in
GM_xmlhttpRequest, say "returnXML: true" that would do the domparser
for us (and maybe toss it in responseXML as well)?
now that I know how to do it, its not so pressing - for me - but I
know I went crazy looking for responseXML that I even went into the
source of GM and saw the comment about security.

On 5/3/05, Mihai Parparita <mihai.parparita at gmail.com> wrote:
> It's not easy to get at the responseXML due to GM and user scripts
> running in different security contexts. You can use the DOMParser
> interface to parse responseText into an XML document. Something along
> the lines of:
> 
> var parser = new DOMParser();
> var xmlDoc = parser.parseFromString(response.responseText, "text/xml");
> 
> See http://www.mozilla.org/xmlextras/ for more info.
> 
> Mihai
> 
> On 5/3/05, Joe la Poutre <jsixpack at gmail.com> wrote:
> > Hello,
> >
> > According to the documentation on mozdev, the
> > GM_xmlhttpRequest does only suport the .responseText field on its
> > results object.
> >
> > The "real" XMLHttpRequest also returns a .responseXML object; is this
> > missing from the GM version?
> >
> > I need it for an existing script in which I directly parse and
> > manipulate the DOM of the result XML...
> >
> > Anyone an update on this, or a work around?
> >
> > Cheers,
> >
> > Joe.
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>


More information about the Greasemonkey mailing list