Re: XMLHttpRequest.responseXML and invalid XML documents

On Mon, 24 Apr 2006 04:41:59 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>>> If the document was not an XML document, or if the document could
>>> not be parsed (due to an XML well-formedness error or unsupported
>>> character encoding, for instance), returns null.
>>
>> All major browsers return an empty document instead under most of
>> these conditions.

There's an open <ednote> on this. Basically people might do:

   .responseXML.getElementsByTagName()

... of course, that would fail in cases where the document is sent as  
text/html and probably others...


> Gecko doesn't ever return an empty document from XMLHttpRequest.   
> Sometimes it returns a bogus document with some "parseerror" markup in  
> it due to <https://bugzilla.mozilla.org/show_bug.cgi?id=289714>; that's  
> a bug that needs to be fixed. [...]

That bug talks about making the document empty, instead of returning null  
as the specification says.

Is it the plan to follow what the specification says or does it need to be  
changed for the above reason for example?


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Monday, 24 April 2006 09:09:51 UTC