3 Replies Latest reply on Jun 10, 2009 2:49 AM by Ajith_Cherian

    How to add nodes to an XML at the nth level?


      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.