I am populating an XML dynamically. I have to keep adding nodes to it in levels. The nodes need to be added not as children of a node but child of child node. How do i achieve this? The structure should look like the one below:
<node1 data="data1" label="label1">
<node2 data="data2" label="label2">
<node3 data="data3" label="label3">
<node4 data="data4" label="label4">
The values 'data' and 'label' for every node will be fetched from an ArrayCollection iteratively.
if you fetch data from ArrayCollection you can realize recursion and add childs instead of adding data to n-th level.
How do you implement recursion in flex? Can you please provide me with an example? You can consider the above scenario.
Another fact that i should add is that at a time i will have an ArrayCollection of children of one particular node. I have to descend to that node and insert that children. I am not able to descend to the required node.