Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Order of xml tags when using dtd?

843834Apr 23 2002 — edited Apr 23 2002
Hi.

If a XML document refers to a DTD, must then the subtags in the XML be in the correct order, or does the DTD describe that as well?
I.e.
My DTD:
<!ELEMENT supertag (tag1?, tag2?, tag3?)>

Is below XML valid, when referring to above DTD?:
<supertag>
<tag3>xxx</tag3>
<tag2>xxx</tag2>
<tag1>xxx</tag1>
</supertag>

If it is valid, is there anyway in a DTD to force the correct order?

btw - Sorry for posting pure xml and dtd in a java forum...

regards
Sigge
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 21 2002
Added on Apr 23 2002
1 comment
454 views