Controlling XML elements order  
Author Message
tomerbd





PostPosted: 2004-9-27 20:22:00 Top

java-programmer, Controlling XML elements order Hi I'm returning an XML to my clients (SOAP). Now I want to order the
items in my XML (I dont want my clients to sort it) is there any API
in DOM that I can use for sorting the elements some way ? or simply
preserving the sort order of that that I added items to the DOM tree?
(I'm adding the items in a sorted way however when I look at the XML
generated its not sorted)
 
LX-i





PostPosted: 2004-9-30 10:51:00 Top

java-programmer >> Controlling XML elements order Tomer Ben-David wrote:
> Hi I'm returning an XML to my clients (SOAP). Now I want to order the
> items in my XML (I dont want my clients to sort it) is there any API
> in DOM that I can use for sorting the elements some way ? or simply
> preserving the sort order of that that I added items to the DOM tree?
> (I'm adding the items in a sorted way however when I look at the XML
> generated its not sorted)

You might be able to implement an XSLT stylesheet that outputs XML, and
use the <xsl:sort> element.


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ / \ / ~ Live from Montgomery, AL! ~
~ / \/ o ~ ~
~ / /\ - | ~ email***@***.com ~
~ _____ / \ | ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ I do not read e-mail at the above address ~
~ Please see website if you wish to contact me privately ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e ~
~ h---- r+++ z++++ ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~