Re: [xsl] How to make tree menu from flat XML

Subject: Re: [xsl] How to make tree menu from flat XML
From: Radoslav Kolarov <roonex@xxxxxxxxx>
Date: Sat, 22 Jul 2006 11:39:57 -0700 (PDT)
Mukul thanks for the answer. The problem is how to
turn tree structured information into dynamic tree
menu. I found some js scripts but I can use them only
if XML is structured heirarchy. So I have to transform
XML to this: 

<?xml version="1.0" ?> 
- <records>

- <record>
  <keynum>-100000</keynum> 
  <keyname>FINANCIAL ALERTS (5)</keyname> 
  <parentkeynum>0</parentkeynum> 
  <rowcnt>5</rowcnt> 
  <balance>0</balance>
  - <record>
    <keynum>-1</keynum> 
    <keyname>2 CLIENTS HAVE A NEGATIVE
BALANCE</keyname> 
    <parentkeynum>-100000</parentkeynum> 
    <rowcnt>2</rowcnt> 
    <balance>0</balance> 
    - <record>
      <keynum>35</keynum> 
      <keyname>35 MR. MICHAEL NOLAN</keyname> 
      <parentkeynum>-1</parentkeynum> 
      <rowcnt>1</rowcnt> 
      <balance>-275</balance> 
      </record>
    - <record>
      <keynum>142</keynum> 
      <keyname>142 MR. JOHN CALINSKI</keyname> 
      <parentkeynum>-1</parentkeynum> 
      <rowcnt>1</rowcnt> 
      <balance>-11</balance> 
      </record>


    </record>

  </record>

</records>

Where the elements witn parentkeynum=0 to be roots,
and elements with parentkeynum=root keynum to be their
childrens nodes, and same thing for third level. So
the question now is how to transform flat XML to
heirarchy XML file like this...

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Current Thread