in Delphi TIPS :: A DTD file can be created to specify valid tags and attributes. The purpose of a DTD is to define the structure of an XML document. It defines the structure with a list of legal elements. Here's how to programmatically validate an XML against a DTD using TXMLDocument and Delphi.
Read the full article to learn how to Validate an XML Against a DTD using TXMLDocument and Delphi