AngleSharp by Florian Rappl

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

 HtmlParser

public sealed class HtmlParser
Represents the Tree construction as specified in 8.2.5 Tree construction, on the following page: http://www.w3.org/html/wg/drafts/html/master/syntax.html
public bool IsAsync { get; }

Gets if the parser has been started asynchronously.

public bool IsFragmentCase { get; }

Gets if the tree builder has been created for parsing HTML fragments.

public IDocument Result { get; }

Gets the (maybe intermediate) result of the parsing process.

The event will be fired once an error has been detected.

public HtmlParser(string source, IConfiguration configuration = null)

Creates a new instance of the HTML parser with an new document based on the given source.

public HtmlParser(Stream stream, IConfiguration configuration = null)

Creates a new instance of the HTML parser with an new document based on the given stream.

public IDocument Parse()

Parses the given source and creates the document.

Parses the given source asynchronously and creates the document.

Parses the given source asynchronously and creates the document.