Re: I am getting crazy. Can't access XML contents in Firefox.
Neil Deakin <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
[email protected] wrote: > > <?xml version="1.0" enconding="utf-8"?> > <ReturnDocument> > <ComboItem> > <Key>1</Key> > <Description>My first item</Description> > </ComboItem> > <ComboItem> > <Key>2</Key> > <Description>My second item</Description> > </ComboItem> > </ReturnDocument> > > > // show contents (Firefox) > for(var i = 0; i < arrTemp.length; i++) > { > alert(arrTemp[i].childNodes[0].nodeValue); // alerts empty > string The first child is the blank space between the <ComboItem> and the <Key>. The second child is a <Key> element and elements have a nodeValue of null. / Neil