AngleSharp by Florian Rappl

<PackageReference Include="AngleSharp" Version="0.5.0" />

 HtmlToken

abstract class HtmlToken
The abstract base class of any HTML token.
protected HtmlTokenType _type

public static HtmlEndOfFileToken EOF { get; }

Gets the end of file token.

public bool IsEof { get; }

Gets if the token is an end-of-file token.

public virtual bool IsHtmlCompatible { get; }

Gets if the token can be used with IsHtmlTIP properties.

public virtual bool IsMathCompatible { get; }

Gets if the token can be used with IsMathMLTIP properties.

public bool IsSvg { get; }

Gets if the given token is a SVG root start tag.

public HtmlTokenType Type { get; }

Gets the type of the token.

protected HtmlToken()

public static HtmlCharacterToken Character(string characters)

Creates a new HTML character token based on the given characters.

public static HtmlTagToken CloseTag()

Creates a new closing HtmlTagToken.

public static HtmlTagToken CloseTag(string name)

Creates a new closing HtmlTagToken for the given name.

public static HtmlCommentToken Comment(string comment)

Creates a new HTML comment token based on the given string.

public static HtmlDoctypeToken Doctype(bool quirksmode)

Creates a new HTML doctype token.

public static HtmlTagToken OpenTag()

Creates a new opening HtmlTagToken.

public static HtmlTagToken OpenTag(string name)

Creates a new opening HtmlTagToken for the given name.

Converts the current token to a tag token.

public bool IsEndTag(string name)

Finds out if the current token is an end tag token with the given name.

public bool IsEndTag(string nameA, string nameB)

Finds out if the current token is an end tag token with one of the given name(s).

public bool IsEndTag(string nameA, string nameB, string nameC)

Finds out if the current token is an end tag token with one of the given name(s).

public bool IsEndTag(string nameA, string nameB, string nameC, string nameD)

Finds out if the current token is an end tag token with one of the given name(s).

public bool IsEndTagInv(string name)

Finds out if the current token is an end tag token with a name that is different than the given one.

public bool IsEndTagInv(string nameA, string nameB, string nameC)

Finds out if the current token is an end tag token with a name that is different than the given one.

public bool IsEndTagInv(string nameA, string nameB, string nameC, string nameD)

Finds out if the current token is an end tag token with a name that is different than the given one.

public bool IsStartTag(string name)

Finds out if the current token is a start tag token with the given name.

public bool IsStartTag(string nameA, string nameB)

Finds out if the current token is a start tag token with one of the given name(s).

public bool IsStartTag(string nameA, string nameB, string nameC)

Finds out if the current token is a start tag token with one of the given name(s).

public bool IsStartTag(string nameA, string nameB, string nameC, string nameD)

Finds out if the current token is a start tag token with one of the given name(s).

public bool IsStartTag(string nameA, string nameB, string nameC, string nameD, string nameE, string nameF)

Finds out if the current token is a start tag token with one of the given name(s).

public bool IsStartTag(string nameA, string nameB, string nameC, string nameD, string nameE, string nameF, string nameG, string nameH, string nameJ)

Finds out if the current token is a start tag token with one of the given name(s).

public bool IsTag(string name)

Finds out if the current token is a start or end tag token with the given name.

protected virtual bool IsTagName(string name)