hello
here’s a simple problem for you. I have a XML file:
<q1>
<q>question</q>
<a>a1</q>
<b>a2</q>
<c>a3</q>
<d>a4</q>
</q1>
I tried to trace it like this but I’m facing an “undefined” output:
var my_xml = new XML();
my_xml.onLoad = function(success){
if (success){
var test=my_xml.firstChild.childNodes;
trace(test[0]);
}
else{
trace("err");
}
}
my_xml.load("q.xml");
what’s the problem?
my_xml.firstChild.childNodes is “<q1> and then <q>” right?
thx for your time.
edit:I’m using CS4,AS2 compiler. But I can even test it on Flash 8.