Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Site navigation using xml

 
sayan maity
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to build a site navigation system using XML and XSLT.
Please let me know if there is any document or code sample available on the net.

Sayan
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code samples for what? Manipulating XML with Java? Transforming XML with XSLT? Or are you after something else?
 
sayan maity
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
Inmy website there are few links and I want to go forward or backward through pages. To do this I need a code sample where the page ids are stored in XML and how to use the XSLT to parse that XML and help in the navigation.

Thanks,
Sayan
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

To do this I need a code sample where the page ids are stored in XML

There's no simple example I can think of that matches your exact requirements. The closest thing I can think of is Struts. You could look at its source to see how they use a controller servlet to read navigation info from struts-config.xml.


and how to use the XSLT to parse that XML

XSLT is not used to parse XML. It is used to transform XML based on a template. XML is parsed with a parser (such an an implementation of SAX or DOM). Have a google you should find plenty of examples. The J2EE tutorial also covers XML parsing.


and help in the navigation.

I don't know how you might use XSLT to help with the navigation. I imagine you could change a particular XML view with XSLT easily enough but I don;t think I really understand what you are trying to achieve well enough to suggest any examples.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic