[flexcoders] node depth in xml/xmllist?

2009-04-02 Thread gwangdesign
Hi,

Could anyone tell me how I can get the depth of a node in an xml/xmlList? Say 
if the node has 0 parent node (root), it's at depth of 0; if it has 1 direct 
parent node which is the direct child of root, it's at the depth of 2, etc.

Thanks.

-geng



RE: [flexcoders] node depth in xml/xmllist?

2009-04-02 Thread Tracy Spratt
You will need to build that little function yourself.  Just loop while
parent() is not null, incrementing a counter.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of gwangdesign
Sent: Thursday, April 02, 2009 4:41 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] node depth in xml/xmllist?

 

Hi,

Could anyone tell me how I can get the depth of a node in an xml/xmlList?
Say if the node has 0 parent node (root), it's at depth of 0; if it has 1
direct parent node which is the direct child of root, it's at the depth of
2, etc.

Thanks.

-geng