XML objects have a parent():* function. Something like this may work:
var parent:XML = selectedItem.parent();
if( parent ){ // check for null
var parentID:String = [EMAIL PROTECTED];
}
-Steve Ashton
--- In [email protected], "bichara.eric" <[EMAIL PROTECTED]>
wrote:
>
> Hi All,
>
> Simple question which im struggling with. I have an xml being used
as
> the data provider for a tree component for example:
>
> <Videos id="1" label="Videos">
> <Video id="2" label="Video1">
> <Match id="3" label="Match1"/>
> </Video>
> <Video id="4" label="Video2">
> <Match id="5" label="Match2"/>
> </Video>
> </Videos>;
>
> When i click on a element of the tree i want to get the ID attribute
> of that element AND the id attribute of the parent node. So if i
click on
> <Match id=3 label="Match"/> then i want to be able to know that the
> parent id is 2. I know how to get the id of the attribute of the
> element i clicked on but not its parent. Any suggestions? Thanks in
> advance
>
> /Eric
>