AngleSharp by Florian Rappl

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

 HtmlParser

public class HtmlParser : IParser
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 HTMLDocument 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)

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

public HtmlParser(Stream stream)

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

public HtmlParser(HTMLDocument document, string source)

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

public HtmlParser(HTMLDocument document, Stream stream)

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

public void Parse()

Parses the given source and creates the document.

public Task ParseAsync()

Parses the given source asynchronously and creates the document. WARNING: This method is not yet implemented.

public void SwitchToFragment(Node context)

Switches to the fragment algorithm with the specified context element.