I am using XML Spy as a parser. The documents I am working with are
carrying data payload. Where the tags are really has not caused a problem,
but the document fail DTD validation unless EVERY tag is in the EXACT order
as specified in the DTD.
From: Thierry Bézecourt [mailto:[log in to unmask]]
Sent: Friday, September 28, 2001 3:12 AM
To: [log in to unmask]
Subject: Re: Order of XML Tags.
> -----Original Message-----
> From: Carty, Gary [mailto:[log in to unmask]]
> I have noticed in some XML editors that the order or XML tags
> is important.
> I was not aware that the order was important as long as the
> hierarchy was
> maintained. Some documentations at W3C states that Order is Required.
Whether the order is important depends on what you use XML for. XML has
typically two kinds of usage.
The first is data representation. In that case, tag order is usually
unimportant; only hierarchy matters:
should probably be handled by an application exactly in the same way as:
The second kind is documents, i.e texts with some structural
information. In that case, order is important. For example:
is very different from:
The first kind of data is often generated from a database and handled by
programs which only care about the hierarchical relationships of the
information, while the second kind will be created directly by humans in
text/XML editors, or built from texts written by humans. Therefore it's
natural for an XML editor to insist on the tag order.
Attribute order, on the other hand, is usually considered as
unimportant, even in documents. The XML Information Set spec, for
example, consider that attributes are unordered. Relying on the
attribute order when designing an XML document would be very dangerous.
[log in to unmask] http://www.bdcworld.com