"KRAUSE,MIKE (HP-FtCollins,ex1)" wrote: > > In the application I am currently helping to develop, we are DEFINITELY > counting on the order in which elements are placed within a document. I'm > not sure if there is a W3C requirement that this be done, but I can imagine > that others might be going on the assumption that the order of elements > within a document matters for the problem they are trying to solve.
While the XML spec itself, because it specifies little more than the syntax, isn't explicit on this the XML Infoset [1] is. From [2]: ---------------- An element information item must have the following properties available in some form: ... 3.[children] An ordered list of references to element, processing instruction, reference to skipped entity and character information items, one for each element, processing instruction, reference to an unprocessed external entity, and character appearing immediately within the current element, in the original document order. If the element is empty, this list will have no members. ---------------- Beware, the same is not true for attributes! [1] http://www.w3.org/TR/xml-infoset [2] http://www.w3.org/TR/xml-infoset#infoitem.element -- Arnaud Le Hors - IBM Cupertino, XML Technology Group