Represents an XML Document Type Definition (DTD).
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
Data Type Definitions (DTD) in XML are a way to do the following:
Validate XML trees to a limited extent.
Expand entities, which is a form of text replacement.
Supply default attributes.
This class represents the XML concept of a DTD.
DTD support in LINQ to XML is limited.
LINQ to XML will not validate a document against a DTD, but you can use a validating XmlReader to perform DTD validation if necessary.
To validate an LINQ to XML tree against an XML schema, use the Validate method.
When a document contains entity references that are defined in a DTD, the references are expanded upon creation of the XML tree. However, when you serialize or save the XML tree, the content of the expanded entities is preserved; the entity references are not.
Default attributes from the DTD will be materialized as regular attributes in the XML tree. After a default attribute from the DTD is materialized, there is no way to determine that the attribute was a default attribute from the DTD.
You can populate an XML tree with an XML document that contains an internal DTD. The XML tree will then contain a DocumentType node. When you serialize or save the tree, the internal DTD will also be saved as part of the document.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.