File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Sorting xml string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Sorting xml string" Watch "Sorting xml string" New topic
Author

Sorting xml string

Palani Kumar
Greenhorn

Joined: May 28, 2008
Posts: 13
How to sort the xml string.. Please help me... Here is the code... I want to sort the xml string based on num tag...
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

That's Javascript code, isn't it? So your question is how to sort the nodes in Javascript. So let's move this to the forum which is about Javascript.
Palani Kumar
Greenhorn

Joined: May 28, 2008
Posts: 13
No here we have to use XSLT . So please move it to xml .
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41124
    
  45
here we have to use XSLT

Why? Is the objective to sort the XML data, or to do so using a particular technique?


Ping & DNS - my free Android networking tools app
Palani Kumar
Greenhorn

Joined: May 28, 2008
Posts: 13
You can use any technology. But actually original xml string is too big. So I cant use array concept here. So I thought its better to use XSLT. Any of your suggestion is welcome.
K West
Ranch Hand

Joined: Sep 10, 2008
Posts: 58

Whats the task.
I mean if you want to do so you by two ways:

If you are getting the xml from some query you can get it ordered by already from there.
Second thing is if you want to display that data sorted by num in table you can use jGrid by jQuery.

But still if you want to sort it in javascript it can be done but would be more complex.


Years teach us more than books.
 
jQuery in Action, 2nd edition
 
subject: Sorting xml string
 
Similar Threads
XML Parsing Problem
Sorting
XML Info Database Help
Problem getting Javascript to display XML data
Using XPath to do an XML lookup