You can use XSL to sort XML nodes before processing
Here's some sample code
sort.xslt
<table border="1">
<xsl:for each select="servlet">
<xsl:sort select="servlet_name" data_type="text"/>
<tr>
<td>
<xsl:apply-templates>
</td>
</tr>
</table>
try this
Santosh
cedric sk chin <[EMAIL PROTECTED]> on 03/30/2001 10:23:20 AM
Please respond to A mailing list about Java Server Pages specification and
reference <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: Santosh Daryani/IT/Aon Consulting)
Subject: urgent, help on sorting records in xml?
hi fellow developers,
can anyone give me some ideas on how to sort records in xml? perhaps a sample
code would do, i need this urgently, i'm using jdom as my back-end.
appreciate if anyone could shed some light on this........
thanks for any help and suggestions.
ced.
for example in this xml file, how do i sort it by the servlet name:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app>
<servlet>
<servlet-name>
snoop
</servlet-name>
<servlet-class>
SnoopServlet
</servlet-class>
</servlet>
<servlet>
<servlet-name>
login
</servlet-name>
<servlet-class>
LoginServlet
</servlet-class>
</servlet>
<servlet>
<servlet-name>
file
</servlet-name>
<servlet-class>
ViewFile
</servlet-class>
</servlet>
</web-app>
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at
http://webmail.netscape.com/
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets