AngleSharp by AngleSharp

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

 StructHtmlToken

public struct StructHtmlToken
Struct representation of an HTML token.
public StructAttributes Attributes { get; }

Gets the list of attributes.

public StringOrMemory Data { get; }

Gets the data of the comment or character token.

public bool HasContent { get; }

Gets if the character data contains actually a non-space character.

public bool IsDoctype { get; }

Is this a doctype token

public bool IsEmpty { get; }

Gets if the character data is empty (null or length equal to zero).

public bool IsFullQuirks { get; }

Gets if the given doctype token represents a full quirks mode state.

public bool IsHtmlCompatible { get; }

Gets if the token can be used with IsHtmlTIP properties.

public bool IsLimitedQuirks { get; }

Gets if the given doctype token represents a limited quirks mode state.

public bool IsMathCompatible { get; }

Gets if the token can be used with IsMathMLTIP properties.

public bool IsProcessingInstruction { get; }

Indicates that this comment token is a processing instruction.

public bool IsPublicIdentifierMissing { get; }

Gets the state of the public identifier.

public bool IsQuirksForced { get; set; }

Gets or sets the state of the force-quirks flag.

public bool IsSelfClosing { get; set; }

Gets or sets the state of the self-closing flag.

public bool IsSvg { get; }

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

public bool IsSystemIdentifierMissing { get; }

Gets the state of the system identifier.

public bool IsTag { get; }

Is this a tag token

public bool IsValid { get; }

Gets the status if the given doctype token matches one of the popular conditions.

public StringOrMemory Name { get; set; }

Gets or sets the name of a tag token.

public TextPosition Position { get; }

Gets the position of the token.

public StringOrMemory PublicIdentifier { get; set; }

Gets or sets the value of the public identifier.

public StringOrMemory SystemIdentifier { get; set; }

Gets or sets the value of the system identifier.

public HtmlTokenType Type { get; }

Gets the type of the token.

public void AddAttribute(StringOrMemory name, TextPosition position)

Adds a new attribute to the list of attributes. The value will be set to an empty string.

public void AddAttribute(StringOrMemory name, StringOrMemory value)

Adds a new attribute to the list of attributes.

public void CleanStart()

Removes all ignorable characters from the beginning.

Gets the value of the attribute with the given name or an empty string if the attribute is not available.

public bool IsStartTag(string name)

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

public void RemoveAttributeAt(int i)

Removes attribute with index i.

public void RemoveNewLine()

Removes the new line in the beginning, if any.

public void SetAttributeValue(StringOrMemory value)

Sets the value of the last added attribute.

Converts the current token instance to a class representation by HtmlToken

Removes all ignorable characters from the beginning.