Table of Contents

Class HtmlTokenizer

Namespace
AngleSharp.Html.Parser
Assembly
AngleSharp.dll

Performs the tokenization of the source code. Follows the tokenization algorithm at: http://www.w3.org/html/wg/drafts/html/master/syntax.html

public sealed class HtmlTokenizer : BaseTokenizer, IDisposable
Inheritance
HtmlTokenizer
Implements
Inherited Members
Extension Methods

Constructors

HtmlTokenizer(TextSource, IEntityProvider)

See 8.2.4 Tokenization

public HtmlTokenizer(TextSource source, IEntityProvider resolver)

Parameters

source TextSource

The source code manager.

resolver IEntityProvider

The entity resolver to use.

Properties

IsAcceptingCharacterData

Gets or sets if CDATA sections are accepted.

public bool IsAcceptingCharacterData { get; set; }

Property Value

bool

IsNotConsumingCharacterReferences

Gets or sets if character references should be avoided.

public bool IsNotConsumingCharacterReferences { get; set; }

Property Value

bool

IsPreservingAttributeNames

Gets or sets if attribute names should be taken as is.

public bool IsPreservingAttributeNames { get; set; }

Property Value

bool

IsStrictMode

Gets or sets if strict mode is used.

public bool IsStrictMode { get; set; }

Property Value

bool

IsSupportingProcessingInstructions

Gets or sets if XML processing instructions should be parsed into DOM nodes.

public bool IsSupportingProcessingInstructions { get; set; }

Property Value

bool

State

Gets or sets the current parse mode.

public HtmlParseMode State { get; set; }

Property Value

HtmlParseMode

Methods

Get()

Gets the next available token.

public HtmlToken Get()

Returns

HtmlToken

The next available token.

Events

Error

Fired in case of a parse error.

public event EventHandler<HtmlErrorEvent>? Error

Event Type

EventHandler<HtmlErrorEvent>