• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML natural order for multiple occurence elements

 
Greg Parker
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the specification say anything about the natural order in xml? Means, when an element which has multiple occurence gets parsed is it guaranteed across parsers that we will get the elements in the same order in the parsed tree? Or do we need to define an attribute to indicate order?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
 
Greg Parker
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:http://www.ibm.com/developerworks/xml/library/x-eleord.html


Does this mean just by introducing a schema, and having a maxOccurs="unbounded" will make the parser bound to report the elements in the document order?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know why it would, or how that's related--is there something you've read that makes you think it's relevant?
 
Greg Parker
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:I don't know why it would, or how that's related--is there something you've read that makes you think it's relevant?

From reading the article. This is what I got.
Normal xml specification doesn't say anything about order or any other processing instructions.
Processing instructions follow a separate specification which usually refers to XML info set specification.
So might get the order?

Also please help me with why we have XML infoset specification?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Infoset provides a clear set of definitions for talking about parts of an XML document.

2. Infoset provides a way to state whether or not some process handles all of the information in an XML document.

I suspect that the W3C thought Infoset became necessary as the number of tools for manipulation of XML grew and grew.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic