Hi,
I have the following records stored in the database :
TableName: Folder { FolderID, FolderName, TopLevel}
TableName: FolderRelationship { ParentID, ChildID}
This describes a folder tree structure. Note that only one record has
TopLevel set to 1, this is the top folder in the structure.
I get the records in two datatables. Then I would like to build the
following xml based on the records :
<node folderid=1 foldername="top folder">
<node folderid=2 foldername "firstchild" />
<node folderid=3 foldername "secondchild">
<node folderid=4 foldername="thirdchild" />
</node>
</node>
which would correspond to the following tree:
top folder
|-firstchild
|-secondchild
|-thirdchild
How can I build such a tree recursively ?
Thank you