Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > does the order of the attributes in the root element matter?

Reply
Thread Tools

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

 
 
hilz
Guest
Posts: n/a
 
      01-18-2006
Hi.
I have two xml files with the following roots:

<MyRootElement
xmlns="http://myURI"
xmlnsrefixA="http://URI_for_A"
xmlnsrefixB="http://URI_for_B"
xmlnssi="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"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlnsrefixA="http://URI_for_A"
xmlnsrefixB="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
 
Reply With Quote
 
 
 
 
Richard Tobin
Guest
Posts: n/a
 
      01-18-2006
In article <wNhzf.116063$oG.100796@dukeread02>, hilz <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can be multiple instances of element used as the root element? VK XML 8 10-31-2006 06:51 PM
Undesired (maybe) attributes in root element of XSLT output Wolfgang XML 1 04-09-2004 04:18 AM
XML file-- XSLT transformation problem with attributes of root element Wolfgang XML 2 04-09-2004 01:20 AM
XML file-- XSLT transformation problem with attributes of root element Wolfgang XML 0 04-06-2004 09:31 PM
Tertiary Conditional: what does this evaluate to ("docRoot == null ? this.root : doc root")? Rick Osborn Java 10 02-08-2004 02:25 AM



Advertisments