You already have the data grouped in your tree.
Simply traverse the tree at different depths and
group the nodes that have the same parents.
For example:
getNodesAtDepth(1) gives the set {1}
getNodesAtDepth(2) gives the set { (101, 102) }
getNodesAtDepth(3) gives the set { (I, II), (I) }
getNodesAtDepth(4) gives the set { (1, 2, 3, 3.5), (41, 42, 43), (1, 2) }
does this help?
"Brad Foster" <> wrote in message
news:bnbtat$s6d$...
> The result i want is this
>
> Get first column [1]
> Process this--
>
> Get second column [101 102]
> Process this--
>
> On third column [I,II], [I]
> Process this--
>
> ON fourth col [1,2,3,3.4], [41,42,43] [1,2]
> Process this--
>
>
> Arrays are ok to use for each of these steps
>
>
> "Thomas Gagné" <> wrote in message
> news:...
> > What exactly do you mean by grouping them? What kind of data structure
> > do you need/want as a result?
> >
> > Brad Foster wrote:
> >
> > >How can I group the following array data
> > >1 9 101 I 1
> > >1 9 101 I 2
> > >
> > >1 9 101 I 3
> > >
> > >1 9 101 I 3.5
> > >
> > >1 9 101 II 41
> > >
> > >1 9 101 II 42
> > >
> > >1 9 101 II 43
> > >
> > >1 9 102 I 1
> > >
> > >1 9 102 I 2
> > >
> > >Thanks
> > >
> > >
> > >
> > >
> > >
> >
> > --
> > .tom
> > remove email address' dashes for replies
> > opensource middleware at <http://isectd.sourceforge.net>
> > http://gagne.homedns.org
> >
> >
>
>