W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

Re: XMLHttpRequest.responseXML and invalid XML documents

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Sun, 23 Apr 2006 21:41:59 -0500
Message-ID: <444C3AF7.60705@mit.edu>
To: "Hallvord R. M. Steen" <hallvord@opera.com>
CC: public-webapi@w3.org

Hallvord R. M. Steen wrote:
> Spec says about responseXML :
>> 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.

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.  But the document is never going to be completely empty; see 

> - FireFox *does* return null if the document is sent as text/html

Or anything else that doesn't look like an XML MIME type.  Or if a network error 
occurs.  Or if the user cancels the load.  An so forth.

Received on Monday, 24 April 2006 02:42:09 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:21 UTC