AngleSharp by AngleSharp

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

 HtmlParser

public class HtmlParser
Creates an instance of the HTML parser front-end.
public IBrowsingContext Context { get; }

Gets the specified context.

public HtmlParserOptions Options { get; }

Gets the specified options.

public HtmlParser()

Creates a new parser with the default options and configuration.

public HtmlParser(HtmlParserOptions options)

Creates a new parser with the custom options.

public HtmlParser(IConfiguration configuration)

Creates a new parser with the custom configuration.

public HtmlParser(HtmlParserOptions options, IConfiguration configuration)

Creates a new parser with the custom options and configuration.

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

public IHtmlDocument Parse(string source)

Parses the string and returns the result.

public IHtmlDocument Parse(Stream source)

Parses the stream and returns the result.

public Task<IHtmlDocument> ParseAsync(string source)

Parses the string asynchronously.

Parses the stream asynchronously.

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

Parses the string asynchronously with option to cancel.

Parses the stream asynchronously with option to cancel.

public INodeList ParseFragment(string source, IElement context)

Parses the string and returns the result.