First, specify the dataProvider for the tree as myXML.RootAA. This produces an XMLList with a single node <RootAA>. If youwant the tree to NOT show this root, set Tree.showRoot="false".
Note: use trace(myXML.toXMLString()); to examine your xml if you have difficulty with writing an e4x expression, like above. You can't really make a node "invisible". I assume by invisible, that you really mean "not there", which is different. You have two options to make this happen. The first is to filter your XML, so the nodes you do not want are not included in the XMLList you provide to the dataProvider. The second is to use a custom DataDescriptor. Custom data descriptors are harder, but more flexible. Finally, if you plan to be programatically updating the tree, then wrap the XMLlist in an XMLListCollection, and use the collection API to manipulate the data. The XMLList API calls do not dispatch the events necessary to cause the UI to update. The Collection calls do. Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of qau_yasir Sent: Thursday, April 17, 2008 8:53 AM To: [email protected] Subject: [flexcoders] Tree Control Help is Required! Hi, I am new to flex world. I have to show the XML data in the Tree Control. XML is in standard format. <RootA> <RootAA> <RootB> <Leaf>1000</Leaf> <Leaf>2000</Leaf> </RootB> <RootB> <Leaf>5000</Leaf> <Leaf>6000</Leaf> </RootB> </RootAA> </RootA> Question # 1. I need to display RootB as first Tree node, 1000, 2000 as its leaves (sub node),then RootB (2nd Node) and 5000 and 6000 as its children (leaves). Question # 2. Is there a way to make any one node invisible in the tree? I will be very thankful to you. Regards YM

