This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes move an element to top Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "move an element to top" Watch "move an element to top" New topic
Author

move an element to top

rick collette
Ranch Hand

Joined: Mar 22, 2002
Posts: 208
Hi,
the following is a well-formed xhtml file:
<td>
<input type="text" name="n1" value="v1"/>
<input type="text" name="n2" value="v2"/>
<input type="text" name="n3" value="title"/>
</td>
I want to transform it into a plain text file such as:
title
v1
v2
That means I need to move third element to the top,
how can I do it? It took a long while with no answer.
regards
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Would <xsl:sort/> do the trick?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Hari Vignesh Padmanaban
Ranch Hand

Joined: Oct 07, 2003
Posts: 578
yes lasse, it would
here is teh code

Hope this helps
hari
rick collette
Ranch Hand

Joined: Mar 22, 2002
Posts: 208
Thanks, guys.

I modified DOM code, and it works fine now.
regards,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: move an element to top
 
Similar Threads
javascript error: object expected
have a question about checking an array of input text
Fixed Table Header and changing classes
Having some multidimensional array problem in JSP
adding values in the textbox and put total in same