aspose file tools*
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
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