[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How to make tree menu from flat XML

Subject: How to make tree menu from flat XML
From: Radoslav Kolarov <roonex@xxxxxxxxx>
Date: Sat, 22 Jul 2006 07:37:34 -0700 (PDT)
tree menu
Hi, I have this XML, and I want to make tree menu. The
roots elements of tree menu are the records with
keynum < -100, the children of the root elements are
records with keynum between -50 and 0 and
parentkeynum=keynum of the root, and the third level
of the tree menu are records with keynum > 0, and the
parentnumber shows the keynum of their parent. Please
help me.
XML file:


<?xml version="1.0" ?> 
- <records>
- <record>
  <keynum>-1</keynum> 
  <keyname>2 CLIENTS HAVE A NEGATIVE BALANCE</keyname>

  <parentkeynum>-100000</parentkeynum> 
  <rowcnt>2</rowcnt> 
  <balance>0</balance> 
  </record>
- <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>
  <keynum>-3</keynum> 
  <keyname>42 CLIENTS CREDIT IS GREATER THAN
BALANCE</keyname> 
  <parentkeynum>-100000</parentkeynum> 
  <rowcnt>42</rowcnt> 
  <balance>0</balance> 
  </record>
- <record>
  <keynum>18</keynum> 
  <keyname>18 MRS. LYNN BONIN</keyname> 
  <parentkeynum>-3</parentkeynum> 
  <rowcnt>1</rowcnt> 
  <balance>0</balance> 
  </record>
- <record>
  <keynum>35</keynum> 
  <keyname>35 MR. MICHAEL NOLAN</keyname> 
  <parentkeynum>-3</parentkeynum> 
  <rowcnt>1</rowcnt> 
  <balance>-275</balance> 
  </record>
- <record>
  <keynum>43</keynum> 
  <keyname>43 MR. JAMES D. NEFF</keyname> 
  <parentkeynum>-3</parentkeynum> 
  <rowcnt>1</rowcnt> 
  <balance>0</balance> 
  </record>
.................
.................
.................
- <record>
  <keynum>10006</keynum> 
  <keyname>10006 MR. DALE SPONSEL 2003-04-24</keyname>

  <parentkeynum>-16</parentkeynum> 
  <rowcnt>1</rowcnt> 
  <balance>0</balance> 
  </record>
- <record>
  <keynum>-100003</keynum> 
  <keyname>APPOINTMENT ALERTS (1)</keyname> 
  <parentkeynum>0</parentkeynum> 
  <rowcnt>1</rowcnt> 
  <balance>0</balance> 
  </record>
- <record>
  <keynum>-100002</keynum> 
  <keyname>HAIR SYSTEM ALERTS (2)</keyname> 
  <parentkeynum>0</parentkeynum> 
  <rowcnt>2</rowcnt> 
  <balance>0</balance> 
  </record>
- <record>
  <keynum>-100001</keynum> 
  <keyname>PROGRAM ALERTS (2)</keyname> 
  <parentkeynum>0</parentkeynum> 
  <rowcnt>2</rowcnt> 
  <balance>0</balance> 
  </record>
- <record>
  <keynum>-100000</keynum> 
  <keyname>FINANCIAL ALERTS (5)</keyname> 
  <parentkeynum>0</parentkeynum> 
  <rowcnt>5</rowcnt> 
  <balance>0</balance> 
  </record>
  </records>

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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.