Thierry Bézecourt wrote:
> 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:
Although this is generally true, there is an important exception. If you
want to validate your document against a DTD, you have to worry about
order. For example, if your DTD is:
<!ELEMENT employee (name, age)>
the first form is valid but the second form isn't, even though the
employee-processing software can probably handle both forms.
One way to get around this is to use "all" groups in XML Schemas, but
those have some limitations that mean they can't be used in all cases.