Controlling XML elements order

Discussion in 'Java' started by Tomer Ben-David, Sep 27, 2004.

  1. 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)
     
    Tomer Ben-David, Sep 27, 2004
    #1
    1. Advertising

  2. Tomer Ben-David

    LX-i Guest

    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 ~ ~
    ~ / /\ - | ~ ~
    ~ _____ / \ | ~ 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++++ ~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    LX-i, Sep 30, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Holger (David) Wagner
    Replies:
    1
    Views:
    553
  2. Chris Rumsey via .NET 247

    Validation Summary controlling the order of messages

    Chris Rumsey via .NET 247, Sep 6, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,649
    Peter Blum
    Sep 6, 2004
  3. Angus Parvis
    Replies:
    1
    Views:
    19,597
    Angus Parvis
    Aug 4, 2004
  4. Chris Rumsey via .NET 247

    Validation Summary - controlling order that error messages are listed

    Chris Rumsey via .NET 247, Sep 15, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    182
    Chris Rumsey via .NET 247
    Sep 15, 2004
  5. Mark Reginald James

    Controlling tab order with JavaScript

    Mark Reginald James, Sep 24, 2005, in forum: Javascript
    Replies:
    22
    Views:
    473
Loading...

Share This Page