Here is my XML:
Code:
<?xml version='1.0' encoding='utf-8' standalone='yes' /?>
<root>
<section text="Hello"></section>
<section text="Goodbye"></section>
</root>
When I load with this
PHP Code:
var my_xml = new XML();
my_xml.onLoad = function(success) {
if (success) {
aNode = my_xml.firstChild.nextSibling.childNodes[1];
trace(aNode);
}
};
my_xml.load("data.xml");
it outputs this
Code:
<section text="Hello" />
I'm trying to target the next node "Goodbye", but it seems to only work if I use odd numbers. If I call it with childNodes[0]; or childNodes[2]; nothing outputs.. It's not until I use childNodes[3]; that it finds the next node
Why is it skipping a number like that? any clues appreciated