Feeding the Tree XML data

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:XMLListCollection id="myXMLCollection">
<mx:XMLList id="myXML">
<friends label="Friends">
<friend label="A" />
<friend label="B" />
<friend label="C" />
</friends>
<families label="Family">
<family label="S" />
<family label="E" />
</families>
</mx:XMLList>
</mx:XMLListCollection>
<mx:Tree dataProvider="{myXMLCollection}" labelField="@label" width="300" height="200" />
</mx:Application>
Related examples in the same category