XmlDocument.DocumentType Property

 

Gets the node containing the DOCTYPE declaration.

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

abstract DocumentType : XmlDocumentType with get
override DocumentType : XmlDocumentType with get

Property Value

Type: System.Xml.XmlDocumentType

The XmlNode containing the DocumentType (DOCTYPE declaration).

An XmlDocument can have one and only one child with XmlNodeType equal to DocumentType.

System_CAPS_noteNote

This property is read-only. To change the DocumentType node, delete the existing node, create a new one using the CreateDocumentType method, and add the new node to the document.

The following example gets and displays the DOCTYPE declaration for the document.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: