|
seems to be that the root element is not treated as a node (or rather
that the root element is the same as the model object itself). Using
the flex debugger in flex builder you can check what txml actually
contains. try this one instead: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> <mx:Model id="txml"> <employees> <employee> <firstname>Aaron</firstname> </employee> <employee> <firstname>DDDDD</firstname> </employee> </employees> </mx:Model> <mx:Script> private function init():void { lbl.text = txml.employee[0].firstname; } </mx:Script> <mx:Label id="lbl" /> </mx:Application> aaron smith wrote:
__._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |

