AngleSharp by Florian Rappl

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

 DocumentBuilder

public static class DocumentBuilder
A handy helper to construct various kinds of documents from a given source code, URL or stream.
public static ICssStyleSheet Css(IConfiguration configuration = null, string url = null)

Builds a new empty CSS StyleSheet with the provided configuration.

public static ICssStyleSheet Css(string sourceCode, IConfiguration configuration = null, string url = null)

Builds a new CSS StyleSheet with the given source code string.

public static ICssStyleSheet Css(Stream stream, IConfiguration configuration = null, string url = null)

Builds a new CSS StyleSheet with the given (network) stream.

public static Task<ICssStyleSheet> CssAsync(Stream stream, IConfiguration configuration = null, string url = null)

Builds a new CSS StyleSheet asynchronously by requesting the given (network) stream.

public static Task<ICssStyleSheet> CssAsync(Stream stream, CancellationToken cancel, IConfiguration configuration = null, string url = null)

Builds a new CSS StyleSheet asynchronously by requesting the given (network) stream.

public static IDocument Html(IConfiguration configuration = null, string url = null)

Builds a new empty HTML Document with the provided configuration.

public static IDocument Html(string sourceCode, IConfiguration configuration = null, string url = null)

Builds a new HTML Document with the given source code string.

public static IDocument Html(Uri url, IConfiguration configuration = null)

Builds a new HTML Document with the given URL.

public static IDocument Html(Stream content, IConfiguration configuration = null, string url = null)

Builds a new HTML Document with the given (network) stream.

public static Task<IDocument> HtmlAsync(Uri url, IConfiguration configuration = null)

Builds a new HTML Document by asynchronously requesting the given URL.

public static Task<IDocument> HtmlAsync(Uri url, CancellationToken cancel, IConfiguration configuration = null)

Builds a new HTML Document by asynchronously requesting the given URL.

public static Task<IDocument> HtmlAsync(Stream content, IConfiguration configuration = null, string url = null)

Builds a new HTML Document asynchronously with the given (network) stream.

public static Task<IDocument> HtmlAsync(Stream content, CancellationToken cancel, IConfiguration configuration = null, string url = null)

Builds a new HTML Document asynchronously with the given (network) stream.

public static INodeList HtmlFragment(string sourceCode, IElement contextElement = null, IConfiguration configuration = null)

Builds a list of nodes according with 8.4 Parsing HTML fragments.