unordered elements in DTD example...bogus?

H

Ha

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 protected]</EMAIL>
</CONTACT>

Alternatively, the following code would be valid:
<CONTACT>
<EMAIL>[email protected]</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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top