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.