Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Node Grouping

Reply
Thread Tools

Node Grouping

 
 
Brad Foster
Guest
Posts: n/a
 
      10-22-2003
How do I do this


<Document>
<Title value=1>
<Chapter value=1/>
<Part value=1/>
<Part value=2/>
<Part value=3/>
<Chapter value=2/>
<Chapter value=3/>
<Chapter value=4/>
<Chapter value=5/>
<Title>
<Title value=2>
<Chapter value=1/>
<Part value=1/>
<Part value=2/>
<Part value=3/>
<Chapter value=2/>
<Chapter value=3/>
<Chapter value=4/>
<Chapter value=5/>
<Title>
</Document>

How can I gather all titles and then all chapters ie Chapter 1, Chapter 2,
Chapter 3, Chapter 4, Chapter 5 of Title 1 and Chapter 1, Chapter 2, Chapter
3, Chapter 4, Chapter 5 of Title 2 and do this recursively

That is, I should do a breadth first traversal(which I have done)...now all
I need is to group by a parent


 
Reply With Quote
 
 
 
 
Phil Hanna
Guest
Posts: n/a
 
      10-23-2003
On Wed, 22 Oct 2003 14:18:06 -0400, "Brad Foster"
<(E-Mail Removed)> wrote:

>How do I do this


What's your context? Are you talking about using Java with DOM/SAX or
something else? XSLT works well for something like this, and you can
call it easily with javax.xml.transform.*. If you can post some more
details, I might be able to help.
--
Phil Hanna
Author of JSP 2.0: The Complete Reference
http://www.philhanna.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xsl variable $node/text() but $node can non-node-set help! Tjerk Wolterink XML 2 08-24-2006 03:28 AM
How to set the node indent property between the parent node and the leaf node viveknatani@gmail.com ASP .Net 0 02-13-2006 07:11 PM
xsl: grouping radiobuttons by name; name should be position of parent node discomiller XML 1 02-01-2005 04:14 PM
How to drag a sub-node to another node in TreeView? wolf ASP .Net 0 08-18-2004 11:51 PM
[HELP] Create a DOM using a node from another node yio@free.fr Java 0 07-16-2003 12:30 PM



Advertisments