Discussion:
DOMParser / XUL / Overlay issue in Firefox 4.0 Beta 4(or5)
George Johnstron
2010-09-17 05:23:35 UTC
Permalink
I’m trying to create a XUL Document from a string using DOMParser
however it fails in Firefox 4.0 Beta 5 (havent tried Beta 4). This
worked fine in Firefox 4.0 Beta 3 as well as 2.x and 3.x.

Some sample code:


nsCOMPtr<nsIDOMParser> domParser =
do_CreateInstance(NS_DOMPARSER_CONTRACTID);
nsCOMPtr<nsIDOMDocument> doc;
domParser->ParseFromBuffer( documentBelow, length, “text/xml”,
getter_Addrefs(spDoc) );


<?xml version="1.0"?>
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/
there.is.only.xul" >
<hbox>
:
XUL
:
</hbox>
</overlay>
Boris Zbarsky
2010-09-17 14:24:39 UTC
Permalink
Post by George Johnstron
I’m trying to create a XUL Document from a string using DOMParser
however it fails in Firefox 4.0 Beta 5 (havent tried Beta 4). This
worked fine in Firefox 4.0 Beta 3 as well as 2.x and 3.x.
You need to init your parser with a system principal.

-Boris
George Johnstron
2010-09-20 02:14:10 UTC
Permalink
Post by Boris Zbarsky
Post by George Johnstron
I’m trying to create a XUL Document from a string using DOMParser
however it fails in Firefox 4.0 Beta 5 (havent tried Beta 4). This
worked fine in Firefox 4.0 Beta 3 as well as 2.x and 3.x.
You need to init your parser with a system principal.
-Boris
Thanks that did it.

Loading...