[thelist] RE: O B J E C T | D E T E C T I O N>>LOAD XML into Netscape

Danny Goodman dannyg at dannyg.com
Fri Apr 5 12:53:00 CST 2002

In the application cited, the file does not "display" per se. Instead, the
XML data is loaded into a non-rendered document object, which should hold
the raw XML -- not XML data converted into pretty-printed HTML (as happens
in IE when you load an XML document into the regular browser window). You
want the raw XML so that scripts can easily walk the node tree to read the
data. That's why, on the IE side, you load the data into an instance of the
MSXML ActiveX control (or embed the data as an XML data island in their
proprietary <xml> element, and display:none that element).

That said, when you try to load an .xml file into the gecko virtual document
(via the load() method of the object returned by the
document.implementation.createDocument() method), the object appears to
refuse the data if it's not sent with a text/xml mime type (although it's
not an issue if everything runs locally). Changing that config setting on
the server fixed the problem for me.


> [Haag, Jason]
> Why would that matter how the mime types are configured,
> if the content displays in IE, and not NS5?
> If it were a case of mime type configuration on the server,
> then the content would display in either, right?
> Please elaborate.
>> From: Danny Goodman <dannyg at dannyg.com>
>> To: <thelist at lists.evolt.org>
>> Reply-To: thelist at lists.evolt.org
>> Make sure your server's mime types configuration explicitly includes
>> text/xml for the .xml extension.

More information about the thelist mailing list