How to display node name in Action script 3 xml

Posted by Mirage on Stack Overflow See other posts from Stack Overflow or by Mirage
Published on 2010-05-31T07:32:20Z Indexed on 2010/05/31 7:32 UTC
Read the original article Hit count: 205

Filed under:

My xml is like below

<rat>
    <to>tt</to>
    <from>ggg</from>
    <heading>hhhhh</heading>
    <body>jjj</body>
</rat>

My AS3 code is

var example:XML = new XML(event.target.data);
_label.text = example[0].rat[0][nodeName];
addChild(_label);

I want to display the data like

to  = tt
from = ggg

how can i do that

© Stack Overflow or respective owner

Related posts about actionscript-3