A Sample DTD

This example uses a recordset with four fields and the code described in Creating a DTD on the Fly to create a DTD. The names and attributes of fields in the recordset are:

The following script shows the resulting DTD:

<! DOCTYPE xmldata [

<! ELEMENT xmldata (record)+>
<! ELEMENT record ("PersonId,Name,Phone?,Email?">
<! ELEMENT PersonId (#PCDATA)>
<! ELEMENT Name (#PCDATA)>
<! ELEMENT Phone (#PCDATA)>
<! ELEMENT Email (#PCDATA)>
<ATTLIST record
         Id ID #REQUIRED
>

]>