Page 1 of 1

problem generating family tree structure

Posted: Fri Aug 18, 2006 6:31 am
by amitsri
hi friends,
i am the new member of this forum
i have been trying to generate a family tree
there may be 3 levels for each node. In the same level user can add siblings. and in the upper level there may user can add parents and in the lower level user can add child node. this may continue to n level for each node. this code should be able to interact with database. i dont understand how to approach this problem.please anyone can help
thanks in advance ,
amit

Posted: Fri Aug 18, 2006 6:34 am
by Ollie Saunders
Use XML

cant follow

Posted: Fri Aug 18, 2006 6:53 am
by amitsri
plz can u make it clear with an example

Posted: Fri Aug 18, 2006 7:23 am
by Ollie Saunders
Well I have a half-sister and that creates a real problem for using any nesting as a structure.
So I've decided this is probably the only robust way of doing it:

Code: Select all

<personIndex>
    <person name="Geoff" id="1" gender="m" />
    <person name="Pam" id="2" gender="f" />
    <person name="Viv" id="3" gender="f" />
    <person name="Oliver" id="4" parents="1 2" gender="m" />
    <person name="Bonnie" id="5" gender="f" parents="1 3" />
</personIndex>

sorry problem

Posted: Fri Aug 18, 2006 7:34 am
by amitsri
i really cant get u i think u r not able to get my problem its not a parent child relationship

Re: problem generating family tree structure

Posted: Fri Aug 18, 2006 7:39 am
by volka
eh, it's not?
amitsri wrote:and in the upper level there may user can add parents and in the lower level user can add child node.
Then what is it?