AngleSharp by AngleSharp

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

 HtmlTokenizer

sealed class HtmlTokenizer : BaseTokenizer
Performs the tokenization of the source code. Follows the tokenization algorithm at: http://www.w3.org/html/wg/drafts/html/master/syntax.html
public bool IsAcceptingCharacterData { get; set; }

Gets or sets if CDATA sections are accepted.

public HtmlParseMode State { get; set; }

Gets or sets the current parse mode.

public HtmlTokenizer(TextSource source, IEventAggregator events, IEntityService resolver)

See 8.2.4 Tokenization

public HtmlToken Get()

Gets the next available token.

public void RaiseErrorOccurred(HtmlParseError error, TextPosition position)

Fires an error occurred event.

Fires an error occurred event at the current position.