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
TextSourceThe source code manager.
resolver
IEntityProviderThe entity resolver to use.
Properties
IsAcceptingCharacterData
Gets or sets if CDATA sections are accepted.
public bool IsAcceptingCharacterData { get; set; }
Property Value
IsNotConsumingCharacterReferences
Gets or sets if character references should be avoided.
public bool IsNotConsumingCharacterReferences { get; set; }
Property Value
IsPreservingAttributeNames
Gets or sets if attribute names should be taken as is.
public bool IsPreservingAttributeNames { get; set; }
Property Value
IsStrictMode
Gets or sets if strict mode is used.
public bool IsStrictMode { get; set; }
Property Value
IsSupportingProcessingInstructions
Gets or sets if XML processing instructions should be parsed into DOM nodes.
public bool IsSupportingProcessingInstructions { get; set; }
Property Value
State
Gets or sets the current parse mode.
public HtmlParseMode State { get; set; }
Property Value
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