XmlWriter.WriteDocType Method (String, String, String, String)
When overridden in a derived class, writes the DOCTYPE declaration with the specified name and optional attributes.
Assembly: System.Xml (in System.Xml.dll)
abstract WriteDocType : name:string * pubid:string * sysid:string * subset:string -> unit
The name of the DOCTYPE. This must be non-empty.
If non-null it also writes PUBLIC "pubid" "sysid" where pubid and sysid are replaced with the value of the given arguments.
If pubid is null and sysid is non-null it writes SYSTEM "sysid" where sysid is replaced with the value of this argument.
If non-null it writes [subset] where subset is replaced with the value of this argument.
This method was called outside the prolog (after the root element).
The value for name would result in invalid XML.
This method does not check for invalid characters in pubid, sysid or subset. It also does not check that the internal subset is well-formed.
The XmlWriter does not validate the data that is passed to the method. You should not pass arbitrary data to this method.
For the asynchronous version of this method, see WriteDocTypeAsync.
Available since 4.5
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 8.1