Mono Class Library: System.Xml.XmlWriter Overview | Members

System.Xml.XmlWriter.WriteDocType Method

Writes the document type declaration with the specified name and optional attributes.

public abstract void WriteDocType (string name, string pubid, string sysid, string subset)

Parameters

name
A string specifying the name of the document type.
pubid
A string specifying the public identifier, which is an alternative to the system identifier.
sysid
A string specifying the system identifier, which is the URI of the DTD (document type definition) for the document.
subset
A string specifying a URI that contains markup declarations.

Exceptions

TypeReason
ArgumentException

name is null or string.Empty.

-or-

The value for name would result in invalid XML.

InvalidOperationExceptionThis method was called outside the prolog (after the root element).

Remarks

Operation
This method writes the document type declaration with the specified name and optional attributes. The optional attributes, pubid, sysid, and subset, are not checked for invalid characters.

Note to Inheritors
This method must be overridden in order to provide the functionality described above, as there is no default implementation.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0