I started with XML this morning, and after playing arund with it for a while, I've found my problem. Every Alternate childNode for every Node in my document is an empty blank node.
For example
<DOCUMENT>
<ONE>Hello</ONE>
<TWO>Goodbye</TWO>
</DOCUMENT>
using javascript
documentElement.childNodes[1].childNodes[0]=Hello
documentElement.childNodes[3].childNodes[0]=Goodbye
I think that these should be accessed as childNodes[0] and [1], but they are not. If i try to access these i get an error.
documentElement.childNodes[0].childNodes[0]
documentElement.firstChild.childNodes[0]
documentElement.lastChild.childNodes[0]
'Error, (document.childNodes[0] || document.firstChild) has no properties'
Does anyone know what the problem is? If it is a problem!
For example
<DOCUMENT>
<ONE>Hello</ONE>
<TWO>Goodbye</TWO>
</DOCUMENT>
using javascript
documentElement.childNodes[1].childNodes[0]=Hello
documentElement.childNodes[3].childNodes[0]=Goodbye
I think that these should be accessed as childNodes[0] and [1], but they are not. If i try to access these i get an error.
documentElement.childNodes[0].childNodes[0]
documentElement.firstChild.childNodes[0]
documentElement.lastChild.childNodes[0]
'Error, (document.childNodes[0] || document.firstChild) has no properties'
Does anyone know what the problem is? If it is a problem!