Okay people...I've been seriously losing sleep over this one!! I've got this GREAT application that is working in IE and I need to support Netscape. Please, Netscape programmers....help!
Basically, I JUST CAN'T seem to parse an XML file in Netscape 6+. Even the VERY BASIC doesn't seem to work. (Hmm...so think of something very ABSTRACT - some minute detail that might CAUSE this not to work; because from what I've seen online...this is supposed to work.) For example:
------------------------------------------------------------
Here's an example of what the XML looks like:
<menus>
<vendors>
<vendor>Brocade</vendor>
<vendor>Cisco</vendor>
<vendor>Emulex</vendor>
<vendor>LSI</vendor>
<vendor>Microsoft</vendor>
<vendor>Novell</vendor>
<vendor>Oracle</vendor>
<vendor>Sun</vendor>
</vendors>
.
. (more elements)
.
</menus>
And here's the code to connect:
var xmlDoc = document.implementation.createDocument("","",null);
xmlDoc.load("compatible_list.xml"
var vendor_list = xmlDoc.getElementsByTagName('vendor');
alert( vendor_list[0].nodeValue );
------------------------------------------------------------
I understand the different methods used for parsing: childNodes, nodeValue, nodeName, appendChild, firstChild, lastChild, etc... and have used just about every method (and arrangements of methods) possible.
My Error (which is SOOOOO frustrating) is:
"vendor_list[0] has no properties"
Thus, statements like "vendor_list.length" will create an error.
This works 100% in IE 5+. But I've been trying for DAYS to get this to work in NS 6+...and it's just not working.
I'm at my wits end. Am I doing something wrong!? Any help would be greatly appreciated.
Thanks so much!
Ship
Basically, I JUST CAN'T seem to parse an XML file in Netscape 6+. Even the VERY BASIC doesn't seem to work. (Hmm...so think of something very ABSTRACT - some minute detail that might CAUSE this not to work; because from what I've seen online...this is supposed to work.) For example:
------------------------------------------------------------
Here's an example of what the XML looks like:
<menus>
<vendors>
<vendor>Brocade</vendor>
<vendor>Cisco</vendor>
<vendor>Emulex</vendor>
<vendor>LSI</vendor>
<vendor>Microsoft</vendor>
<vendor>Novell</vendor>
<vendor>Oracle</vendor>
<vendor>Sun</vendor>
</vendors>
.
. (more elements)
.
</menus>
And here's the code to connect:
var xmlDoc = document.implementation.createDocument("","",null);
xmlDoc.load("compatible_list.xml"
var vendor_list = xmlDoc.getElementsByTagName('vendor');
alert( vendor_list[0].nodeValue );
------------------------------------------------------------
I understand the different methods used for parsing: childNodes, nodeValue, nodeName, appendChild, firstChild, lastChild, etc... and have used just about every method (and arrangements of methods) possible.
My Error (which is SOOOOO frustrating) is:
"vendor_list[0] has no properties"
Thus, statements like "vendor_list.length" will create an error.
This works 100% in IE 5+. But I've been trying for DAYS to get this to work in NS 6+...and it's just not working.
I'm at my wits end. Am I doing something wrong!? Any help would be greatly appreciated.
Thanks so much!
Ship