AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="1.2.0-beta.448" />

 HtmlParser

Creates an instance of the HTML parser front-end.
public HtmlParserOptions Options { get; }

Gets the specified options.

public event DomEventHandler Error

Fired when a HTML parse error is encountered.

public event DomEventHandler Parsed

Fired when the HTML parser is finished.

public event DomEventHandler Parsing

Fired when the HTML parser is starting.

public HtmlParser()

Creates a new parser with the default options and context.

public HtmlParser(HtmlParserOptions options)

Creates a new parser with the custom options.

Creates a new parser with the custom options and the given context.

public IHtmlDocument ParseDocument(string source)

Parses the string and returns the result.

Parses the stream and returns the result.

public IHtmlDocument ParseDocument(char[] source, int length = 0)

Parses the read array of chars and returns the result.

Parses the read only chunk of chars and returns the result.

Parses text source and returns result.

public TDocument ParseDocument<TDocument, TElement>(TextSource source, TokenizerMiddleware middleware = null) where TDocument : IConstructableDocument where TElement : IConstructableElement

Parses the read only text source and returns the result.

public Task<IHtmlDocument> ParseDocumentAsync(string source, CancellationToken cancel)

Parses the string asynchronously with option to cancel.

Parses the stream asynchronously with option to cancel.

public INodeList ParseFragment(Stream source, IElement contextElement)

Parses the stream and returns the result.

public INodeList ParseFragment(string source, IElement contextElement)

Parses the string and returns the result.

public IHtmlHeadElement ParseHead(string source)

Parses the string and returns the head.

Parses the stream and returns the head.

public Task<IHtmlHeadElement> ParseHeadAsync(string source, CancellationToken cancel)

Parses the string asynchronously with option to cancel.

Parses the stream asynchronously with option to cancel.