does the order of the attributes in the root element matter?

Discussion in 'XML' started by hilz, Jan 18, 2006.

  1. hilz

    hilz Guest

    Hi.
    I have two xml files with the following roots:

    <MyRootElement
    xmlns="http://myURI"
    xmlns:prefixA="http://URI_for_A"
    xmlns:prefixB="http://URI_for_B"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://myURI http://myURI/mySchema.xsd"
    prefixA:someAttribute="some value"
    >


    in another file, i have this:

    <MyRootElement
    xsi:schemaLocation="http://myURI http://myURI/mySchema.xsd"
    prefixA:someAttribute="some value"
    xmlns="http://myURI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:prefixA="http://URI_for_A"
    xmlns:prefixB="http://URI_for_B"
    >



    I know the first one is the correct one.
    But my question is: is the second one wrong? does the order of the
    attributes in the root element really matter?

    Thanks
     
    hilz, Jan 18, 2006
    #1
    1. Advertising

  2. In article <wNhzf.116063$oG.100796@dukeread02>, hilz <> wrote:
    >But my question is: is the second one wrong? does the order of the
    >attributes in the root element really matter?


    No, the order of attributes is never important in XML.

    -- Richard
     
    Richard Tobin, Jan 18, 2006
    #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. SpaceCowboy
    Replies:
    6
    Views:
    531
    SpaceCowboy
    Aug 14, 2003
  2. Mark
    Replies:
    5
    Views:
    578
  3. pete
    Replies:
    20
    Views:
    670
    Richard Bos
    Jun 13, 2005
  4. Brian Dude

    Does structure order matter?

    Brian Dude, Jan 22, 2006, in forum: C Programming
    Replies:
    8
    Views:
    319
    Brian Dude
    Jan 24, 2006
  5. Replies:
    2
    Views:
    1,542
    Joseph Kesselman
    Aug 10, 2007
Loading...

Share This Page