Xml help!

I want to use some xml content, to then get another xml node/content,

such as
var name:XMLList = xml.person.text()
which might equal somthing like “john”,

then to get all the nodes named john i’d do this

xml.name;

however this isnt working, but if i do
xml.john,
that would work,

any ideas?
thx
!m