When working with trees, I prefer to set my data service call to resultFormat="xml".
Then, in the label function, you can use the familiar xml class methods and properties to define your label. resultFormat defaults to "object" and Flex converts the xml into an mx:Object. If you are comfortable with this you can leave the result type alone and use dot notation to access the data you want for your label. When you select a node in the tree (resultFormat=xml), the tree.selectedNode will be a reference to the xml node that produced it. Access it with xml class members or using the TreeDataProvider api. Tracy -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Augie Sent: Monday, October 03, 2005 4:10 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex tree labelFunction Help Hi all, Can someone please help me out using the Flex tree labelFunction. I have a massive XML document with no labels specified. I need to right a function that grabs only nodes and display them within my tree control. Thank you in advance. Much Appreciated. -Augie ______________________________________________________ Yahoo! for Good Donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/ -- 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 ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/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/