The two main methods of describing XML grammars are XML Schemas and Document Type Definitions (DTDs). DTD is now a legacy format, having been replaced by the newer schema grammar.