maybe this will give you some insight. i did not encode the result into xml
format..
<?xml version="1.0" encoding="utf-8"?><mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script>
<![CDATA[ [Bindable] var xml:XML = <products
label="products">
<item label="item1">
<sku label="sku">1001</sku><quantity
label="quantity">100</quantity>
</item>
<item label="item2">
<sku
label="sku">1002</sku><quantity label="quantity">100</quantity>
</item>
</products>
private function onClick(event):void {
var parent = event.currentTarget.selectedItem.parent();
//mx.controls.Alert.show(event.currentTarget.selectedItem.toString());
do {
mx.controls.Alert.show([email protected]());
parent = parent.parent(); } while
(parent); } ]]> </mx:Script>
<mx:Tree width="100%" click="onClick(event)" dataProvider="{xml}"
labelField="@label" showRoot="false" >
</mx:Tree></mx:Application>
DOES ANYONE KNOW WHAT KIND OF VARIABLE parent WOULD BE.. INSTANTIATED AS?