Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Re: Nested XML

Reply
Thread Tools

Re: Nested XML

 
 
Johannes Koch
Guest
Posts: n/a
 
      07-29-2003
Mikael Olesen wrote:
> My file is nested and look like this:
> <BOOKS>
> <SUBJECT>
> <SUBJECTTEXT>Sub 1</SUBJECTTEXT>
> <BOOK>
> <TITLE>Bla. bla.</TITLE>
> <WRITER>Bla. bla.</WRITER>
> <BOOK>
> <BOOK>
> <TITLE>Bla. bla.</TITLE>
> <WRITER>Bla. bla.</WRITER>
> <BOOK>
> <BOOK>
> <TITLE>Bla. bla.</TITLE>
> <WRITER>Bla. bla.</WRITER>
> <BOOK>
> </SUBJECT>

[...]
> </BOOKS>
>
> So for each subject there can be 1 or more books. And I need a subject
> title for each subject. Can I do that? And how would the HTML look
> like?


Write templates for SUBJECT, SUBJECTTEXT, and BOOK. In the SUBJECT
template you apply the template for SUBJECTTEXT, generate an HTML ul or
ol, and, within that, apply templates for BOOK.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

 
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
dealing with nested xml within nested xml within...... Ultrus Python 3 07-09-2007 09:00 PM
Is nested class automatically friend of class that it is nested in? request@no_spam.com C++ 5 09-25-2006 08:31 AM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
Nested Vector Nester Classes are Nested in my Brain Chad E. Dollins C++ 3 11-08-2005 04:46 AM
Nested iterators (well, not nested exactly...) Russ Perry Jr Java 2 08-20-2004 06:51 PM



Advertisments