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. Advertisements

  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. Advertisements

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. 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,793
    Peter Blum
    Sep 6, 2004
  2. Angus Parvis
    Replies:
    1
    Views:
    20,120
    Angus Parvis
    Aug 4, 2004
  3. Wolfgang
    Replies:
    2
    Views:
    802
    Wolfgang
    Oct 7, 2003
  4. P
    Replies:
    1
    Views:
    1,361
    Joe Kesselman
    Jul 7, 2006
  5. Ultrus
    Replies:
    4
    Views:
    4,299
    Stefan Behnel
    Aug 30, 2007
  6. Chris Seberino
    Replies:
    3
    Views:
    901
    Stefan Behnel
    Jun 12, 2009
  7. 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:
    257
    Chris Rumsey via .NET 247
    Sep 15, 2004
  8. Mark Reginald James

    Controlling tab order with JavaScript

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