DocumentType Class

https://dom.spec.whatwg.org/#interface-documenttype

public sealed class DocumentType : Node, IChildNode
Inheritance
Node DocumentType
Implements

Properties

NameDescription
NameGets the name of the document type.
NodeNameGets the node name of a document type, which is its name.
NodeTypeGets the node type of a document type, which is 10 (DOCUMENT_TYPE_NODE).
PublicIdGets the public identifier of the document type.
SystemIdGets the system identifier of the document type.

Gets the name of the document type.

public string Name { get; }

Gets the node name of a document type, which is its name.

public override string NodeName { get; }

Property value

string

Gets the node type of a document type, which is 10 (DOCUMENT_TYPE_NODE).

public override ushort NodeType { get; }

Property value

ushort

Gets the public identifier of the document type.

public string PublicId { get; }

Gets the system identifier of the document type.

public string SystemId { get; }

Methods

NameDescription
After(ReadOnlySpan<NodeOrString>)Inserts the nodes just after this node, converting the strings into text nodes.
Before(ReadOnlySpan<NodeOrString>)Inserts the nodes just before this node, converting the strings into text nodes.
Remove()Removes this node from its parent, if any.
ReplaceWith(ReadOnlySpan<NodeOrString>)Replaces this node with the given nodes in its parent, converting the strings into text nodes.

After(ReadOnlySpan<NodeOrString>)

Mixins.Members.cs

Inserts the nodes just after this node, converting the strings into text nodes.

public void After(params scoped ReadOnlySpan<NodeOrString> nodes)

Before(ReadOnlySpan<NodeOrString>)

Mixins.Members.cs

Inserts the nodes just before this node, converting the strings into text nodes.

public void Before(params scoped ReadOnlySpan<NodeOrString> nodes)

Removes this node from its parent, if any.

public void Remove()

ReplaceWith(ReadOnlySpan<NodeOrString>)

Mixins.Members.cs

Replaces this node with the given nodes in its parent, converting the strings into text nodes.

public void ReplaceWith(params scoped ReadOnlySpan<NodeOrString> nodes)