AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="1.4.1-beta.504" />

 HtmlDomBuilder<TDocument, TElement>

class HtmlDomBuilder<TDocument, TElement> : IDisposable where TDocument : IConstructableDocument where TElement : IConstructableElement
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

Gets the adjusted current node.

Gets the current node.

public bool IsFragmentCase { get; }

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

public HtmlDomBuilder(IDomConstructionElementFactory<TDocument, TElement> elementFactory, TDocument document, HtmlTokenizerOptions? maybeOptions = default, bool emitWhitespaceTextNodes = false, Func<IConstructableElement, bool> shouldEnd = null)

public void Dispose()

public TDocument Parse(HtmlParserOptions options, TokenizerMiddleware middleware = null)

Parses the given source and creates the document.

public Task<TDocument> ParseAsync(HtmlParserOptions options, TokenizerMiddleware middleware = null, CancellationToken cancelToken = default)

Parses the given source asynchronously and creates the document.

public TDocument ParseFragment(HtmlParserOptions options, TElement context)

Switches to the fragment algorithm with the specified context element. Then parses the given source and creates the document.