<!ELEMENT database (record+) > <!ELEMENT record (firstname,lastname,phone+)> <!ATTLIST record created NMTOKEN #IMPLIED > <!ELEMENT firstname (PCDATA)> <!ELEMENT lastname (PCDATA)> <!ELEMENT phone (PCDATA)>tDom with its extension tnc can validate XML documents by a given DTD. LV 2007 Oct 09 - it isn't clear how tdom can validate xml documents by a given DTD.As the language of DTDs differs from XML, it is considered old-fashioned, and several replacements (which follow XML syntax) have been proposed: XML Schema, ...
MAKR: There is fun project called A little XML Schema validator ...