Hi Neil, Indeed, ideally you create an XML instance on your model. It would make sense to have this loaded XML a single point of reference throughout the application.
Bjorn, --- In flexcoders@yahoogroups.com, nwebb <[EMAIL PROTECTED]> wrote: > > Hi, I'm loading XML in to Flex2 at compile-time and would like to bind label > properties of certain modes to a Tree list display. > > The docs say that you cannot (currently) bind to properties of an XML > instance (the XML class is not of type IEventDispatcher) so I thought I > would try loading the XML in to Model instance instead, using: > > <mx:Model id="menuItems" source="xml/menuOptions.xml" /> > > My test XML looks like this: > <?xml version='1.0' ?> > <menu> > <folder label="Flex 2"> > <item label="Tutorial 1" >Hello</item> > <item label="Tutorial 2" /> > <item label="Tutorial 3" /> > </folder> > </menu> > > I don't think model instances support attributes though, so while trace( > menuItems.item[0]) works, I can't seem to access the label attribute. Could > someone confirm that this is right, and if so, are there any better > suggested methods to use, or do i just need to load the xml in to an XML > instance, and then use E4X to pull out the label attributes and assign them > to bindable vars of my own creation? > > Cheers, > Neil > ------------------------ Yahoo! Groups Sponsor --------------------~--> Yahoo! Groups gets a make over. See the new email design. http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/