unordered elements in DTD example...bogus?

Ha

Usenet Archive
Joined
Jul 3, 2000
Messages
4
Reaction score
0
I found an article (see link below) that states that xml elements can be order independent by removing the commas in the DTD.

Ex: (notice no comma between NAME and EMAIL)
<!ELEMENT CONTACT (NAME EMAIL)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT EMAIL (#PCDATA)>

In this case, we expect to see XML along the lines of:
<CONTACT>
<NAME>Jim Sanger</NAME>
<EMAIL></EMAIL>
</CONTACT>

Alternatively, the following code would be valid:
<CONTACT>
<EMAIL></EMAIL>
<NAME>Jim Sanger</NAME>
</CONTACT>

I have not found any other articles supporting this. All others state to use either attributes, or create permutations.

Is this a bogus article?
http://wdvl.internet.com/Authoring/Languages/XML/Tutorials/Intro/order.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,224
Members
248,132
Latest member
henrywalsh

Latest Threads

Top