[thelist] Firefox 1.5 and XML
kasimir-k
evolt at kasimir-k.fi
Sun Feb 19 05:20:43 CST 2006
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
More information about the thelist
mailing list