I'm just gettin back into Flash and into XML, so I'm a but rusty...

Anyway, here's the XML code:
code:

<CONTINENT name="North America">
<COUNTRY name="Canada" />
<COUNTRY name="USA" />
<COUNTRY name="Mexico" />
</CONTINENT>


Simple.
Now, it was working, but I did something and it went to crap. All I need is for it to trace the country attribute "name". Number 2 is the only one not "undefined":
code:

doc=new XML()
doc.load("world.xml")
doc.onLoad=function(){
for(i=0;i<3;i++){
trace(doc.firstChild.childNodes[i].attributes.name)
}
}


Should work...what am I missing?