[thelist] Firefox 1.5 and XML

Tom Schmidt ildenizen at insightbb.com
Sun Feb 19 08:41:57 CST 2006


Help was on its way fast!  Thank you for your assistance.

I had assumed I had a valid XML file, as when I open it with either browser
it gets displayed with no errors.
I added these alerts and got the following:
xmlDoc.nodeType = 9
xmlDoc.tagName = undefined
xmlDoc.innerHTML = undefined
xmlDoc.documentElement = null

I also tried to see what would happen if I used
nodes = xmlDoc.childNodes
While this did not produce any errors, accessing its length with
(nodes.length) gave me zero, not quite what I had hoped for.

Sadly I do not have any development time today, so I am posting my results
without having researched what they mean - which of course means I am
clueless at this point.
Hopefully there will be someone that will be able to "clue" me in.

Thanks in advance

----- Original Message ----- 
From: "kasimir-k" <evolt at kasimir-k.fi>
To: <thelist at lists.evolt.org>
Sent: Sunday, February 19, 2006 5:20 AM
Subject: Re: [thelist] Firefox 1.5 and XML


> Tom Schmidt scribeva in 19/02/2006 3:57:
>
> >      xmlDoc= document.implementation.createDocument("","",null)
> >      xmlDoc.load(xmlFile)
> ...
> >   nodes=xmlDoc.documentElement.childNodes
> ...
> >      Error: xmlDoc.documentElement has no properties
>
> Try for example these before using xmlDoc.documentElement
> // document node: 9, element node: 1, text node: 3
> alert(xmlDoc.nodeType);
> alert(xmlDoc.tagName);
> alert(xmlDoc.innerHTML);
> alert(xmlDoc.documentElement);
>
> It could be that the document you load isn't a valid DOM document.
>
> If that is the case, then you could try just:
> nodes = xmlDoc.childNodes
>
> Have you read these already? They might help understanding
> document.implementation.createDocument
> http://xulplanet.com/tutorials/mozsdk/xmlparse.php
> http://www.webreference.com/programming/javascript/domwrapper/2.html
>
> .k
> -- 
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>





More information about the thelist mailing list