The structure of an XML document can be validated against a Document Type Definition (DTD) for correctness. DTDs can be inlined in XML documents, and can refer to external entities.