This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML: Order of elements, do they matter?

 
Rajagopal Manohar
Ranch Hand
Posts: 183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fragment 1

Fragment 2


Are Fragment 1 & 2 equvivalent xml documents going by XML specifications.

Thanks,
Rajagopal
 
Dave Lenton
Ranch Hand
Posts: 1241
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In theory (according to the specs IIRC) it doesn't matter about the order..... but.... quite often the things done with XML such as SAX parsing, XSL, transforming data into displayed content and so on do give different results depending upon the order of the nodes. Also if it has a DTD associated with it then the order may matter. So, its depends much on what you're going to do with the XML as to if you should be worried about the order or not.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic