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

Haag, Jason haagj at ctcgsc.org
Mon Apr 8 10:23:59 CDT 2002


"=Danny-("although it's
not an issue if everything runs locally")



I haven't been able to load it with NS6 locally, either though. I have used
an alert for debugging, and always return the top object node, but I can't
imagine what might be preventing it to load locally.

I initially uploaded this for troubleshooting, but thanks for the input
regarding the mime-type settings. I learned something new! I really do
appreciate your correspondence.


Any ideas on using:
var nodes = xmlDoc.documentElement.childNodes;

Versus:
var nodes = xmlDoc.getElementsByTagName('SCREEN');

???

Jason
haagj at ctcgsc.org
--------------------------------------
Date: Fri, 05 Apr 2002 10:49:16 -0800
Subject: [thelist] RE: O B J E C T | D E T E C T I O N>>LOAD XML into
	Netscape
From: Danny Goodman <dannyg at dannyg.com>
To: <thelist at lists.evolt.org>
Reply-To: thelist at lists.evolt.org

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.

Danny
http://www.dannyg.com

> [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.
>
<snip>
>> 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