simple algorithm tree/array pbm



hi !

I'm trying to simulate a "windows explorer-like" tree on my page. What
I would like is when the user click one of the level, the data make
themselves visible ( It's ok to recharge the page).

I tried to use the xml/xslt following example :

http://www.map.archi.fr/dpea/coursHtml/Exercices/exercice8/arbre/CalaRossaSurvey.xml
http://www.map.archi.fr/dpea/coursHtml/Exercices/exercice8/arbre/arbre.php

But as I don't know xsl I can't figure out how to add a hlink or a
checkbox on the resulting tree in order to have further actions...

So I decided to do it myself, It seems like I´m reaching my limits
when I've to manage this kind of structure :

Array
(
[3100000000] => Array
(
[0] => Array
(
[0] => 3110000000
[1] => 3210000000
[3220000000] => Array
(
[0] => Array
(
[0] => 3220000001
[1] => 3220000002
[2] => 3220000003
[3] => 3220000004
[4] => 3220000005
[5] => 3220000006
)

)

[2] => 3230000000
)

)

[3200000000] => Array
(
[0] => Array
(
[0] => 3400000000
[1] => 3221000000
)

)

)
First I display

3100000000
3200000000

And I would like when someone click on 3100000000 to see :
3100000000
3110000000 |
3210000000 |
3220000000 |=> new visible lines
3230000000 |
3200000000

And following, when clinking on

3100000000
3110000000
3210000000
3220000000
3220000001 |
3220000002 |
3220000003 |=> new visible lines
3220000004 |
3220000005 |
3220000006 |
3230000000
3200000000


Yes, it's a simple algorithm problem, but I can't figure out how to do
it...
Any idea of code or library making it is welcome...

Thanks.
JR.

.



Relevant Pages

  • Re: Easy balanced tree
    ... The tree can hold between 4 and 7 values, if it was lower than 4 ... then the array would be smaller so we ignore those cases. ... Secondly there is wasted space in the middle of the array (with ... rdrop nip nip; ...
    (comp.lang.forth)
  • Re: [opensuse] Recover md RAID-1.
    ... md: md0 stopped. ... Then try booting the array with just /dev/sdb1 as a member. ... A ball hitting a tree shall be deemed not to have hit the tree. ...
    (SuSE)
  • Re: array moving left
    ... I have an array in which elements are present. ... Instead maintain a binary tree of deletion points. ... The left child weight of a node is the number of nodes under it on the ... deletions have occurred to the left of the element. ...
    (comp.programming)
  • Re: [opensuse] Recover md RAID-1.
    ... md: md0 stopped. ... Then try booting the array with just /dev/sdb1 as a member. ... A ball hitting a tree shall be deemed not to have hit the tree. ...
    (SuSE)
  • Re: Easy balanced tree
    ... An efficient way to arrange a searchable binary tree that does not ... We put the items or pointers to the items into an array. ... tree-depth 2* or begin ... Secondly there is wasted space in the middle of the array (with ...
    (comp.lang.forth)