Re: DOMParser RFE issues

Martin Honnen <[email protected]> Sat, 27 May 2006 14:12:52 +0200
Newsgroups gmane.comp.mozilla.devel.xml
Organization Liberty Development
Message-ID <[email protected]>
Alex Vincent wrote:


> Second, parsererror elements live in the null namespace.  So if there's 
> a person who is nutty enough to edit a XML document with a root element 
> of parsererror, I have no way of knowing that it's a real document.

No, I am pretty sure that with Mozilla 1.0 and later that parsererror 
root element is in the namespace 
http://www.mozilla.org/newlayout/xml/parsererror.xml e.g. if you have

var xmlDocument = new DOMParser().parseFromString('<gods>', 
'application/xml');
alert(
xmlDocument.documentElement.tagName + '\r\n' + 
xmlDocument.documentElement.namespaceURI);

it shows

parsererror
http://www.mozilla.org/newlayout/xml/parsererror.xml

I have tested that now with Firefox 1.5.0.3 but I am pretty sure that 
there is no difference in earlier releases.


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/