Remember that order is important if the XML is validated against a DTD.  For
instance, if your DTD
contains <!ELEMENT user (name, email_address+, title?)> then valid XML could
be
<user>
      <name>Craig Noah</name>
     <email_address>[EMAIL PROTECTED]</email_address>
</user>

but this would be invalid (but well-formed):
<user>
     <email_address>[EMAIL PROTECTED]</email_address>
     <name>Craig Noah</name>
</user>

I hope this helps.

Craig

Jeff Lewis wrote:

> We are having an internal discussion about whether or not to trust the
> ordering of elements within the DOM once an XML document has been parsed.
>
> I am arguing that the DOM should retain the order of elements from the XML
> file, but I have yet to find any requirement, W3C or otherwise, that it do
> so...
>
> Any comments?



--
Craig Noah                  INTERNET: [EMAIL PROTECTED]
Software Engineer

                Sterling Software ITD
1404 Fort Crook Road South     Phone:    (402) 291-8300 x 284
Bellevue,  NE   68005-2969     FAX:      (402) 291-4362



Reply via email to