File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Sorting in XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Sorting in XML" Watch "Sorting in XML" New topic

Sorting in XML

Nagarajan Krishnamurthy

Joined: Sep 26, 2003
Posts: 20
I have to display a XML file using XSL in a browser.And the main constraint is i have two or three columns in it.First level sorting is achieved by using XSL.What abt second level sorting?How would i be able to do that soring?

Say for an example
If it as three columns namely : Author ,Book , Price
At the time of loading the file i can sort either using Author or Book or Price
Once it is loaded assume that i wanna sort using Price.

How would i be able to do this one ?
Arun Prasath
Ranch Hand

Joined: Sep 17, 2003
Posts: 192
On click of that corresponding column you can sort either at the server side or if the browser supports you can sort at the client's end using XSL.

SCJP 1.4, SCDJWS , SCJA<br />I can do ALL things through CHRIST who strengthens me.
Nagarajan Krishnamurthy

Joined: Sep 26, 2003
Posts: 20
The functionality is such that the client should be able to see the data in the manner he/she wants.Say for an example if they want that to be sorted as per the author if the click the author tab it should sort that.
I agree. Here's the link:
subject: Sorting in XML
It's not a secret anymore!