Exemple de DTD XML


<!ELEMENT memo    (to, from, date, subject?, body) >
<!ATTLIST memo security (public | member | team) 'public'
               status   (draft | finished) #REQUIRED >
<!ELEMENT to      (#PCDATA) >
<!ELEMENT from    (#PCDATA) >
<!ELEMENT date    (#PCDATA) >
<!ELEMENT subject (#PCDATA) >
<!ELEMENT body    (p+) >
<!ELEMENT p       (#PCDATA | em)* >
<!ELEMENT em      (#PCDATA) >