The document discusses two ways to validate XML documents: Document Type Definitions (DTDs) and XML Schema. DTDs define the legal structure of an XML document using elements, tags, attributes, entities, and other building blocks. A DTD can be internal or external and is referenced in the DOCTYPE declaration. DTDs allow XML files to carry their own validation description and are used to verify that external data is valid.