why use dtd in xml?
The purpose of a DTD (Document Type Definition) is to define the legal building blocks of an XML document. A DTD defines the document structure with a list of legal elements and attributes. You can validate your XML-Document to see if it only uses the by you pre-defined tags in your DTD.