Tree control and XMLListCollection
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Tree id="tree1" labelField="@label" showRoot="true" width="160"> <mx:XMLListCollection id="MailBox"> <mx:XMLList> <folder label="Doc"> <folder label="Doc 1" /> <folder label="Doc 2"> <Pfolder label="Chapter 1" /> <Pfolder label="Chapter 2" /> <Pfolder label="Chapter 3" isBranch="true" /> <Pfolder label="Chapter 4" /> </folder> <folder label="Pdf" /> <folder label="Rdf" /> </folder> </mx:XMLList> </mx:XMLListCollection> </mx:Tree> </mx:Application>