I'm want to implement something that will look similar to Windows's file explorer - it should have a tree on the left side and a table (datagrid) on the right side. The tree displays some hierarchy, let's say folders, and upon selection on a folder in the tree, the right side displays the files inside it. Important to say that the tree doesn't show leafs (files), just like in the file explorer in Windows.
The entire hierarchy is supplied as an XML to my flex application.
How can I hide the leafs (the "File" tags) in the tree but show them on the table when clicking on the parent folder? How can I "slice" the XML and supply the children (and only them) to the table (datagrid)?