XML data for Tree view
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:XML id="capitals"> <root> <Capitals label="A"> <capital label="A1" value="value 1" /> <capital label="A2" value="value 2" /> <capital label="A3" value="value 3" /> </Capitals> <Capitals label="B"> <capital label="B1" value="value 4" /> <capital label="B2" value="value 5" /> <capital label="B3" value="value 6" /> </Capitals> </root> </mx:XML> <mx:Tree id="Tree1" dataProvider="{capitals}" labelField="@label" showRoot="false" width="300" /> </mx:Application>