what is dtd in xml

11 months ago 19
Nature

DTD stands for Document Type Definition, which defines the legal building blocks of an XML document. It is a specification file that contains a set of markup declarations that define a document type for an SGML-family markup language. A DTD can be declared inline inside an XML document or as an external reference. It defines the structure of an XML document with a list of validated elements and attributes. A DTD can be used to validate documents and to verify that the data received from the outside world is valid. An XML document validated against a DTD is both "Well Formed" and "Valid".