Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

AngleSharpHtmlParser

OfficeIMO.Html.Providers

Namespace
OfficeIMO.Html.Providers
Assembly
OfficeIMO.Html.AngleSharp
Source revision
ba882f6b0d07 with working tree changes
Implements
IHtmlParserProvider
Modifiers
sealed

Inert HTML parsing backed by AngleSharp, returning owned OfficeIMO document snapshots.

Inheritance

  • object
  • AngleSharpHtmlParser

Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 1

Constructors

public AngleSharpHtmlParser() #

Methods

public HtmlDocument ParseDocument(string source, HtmlParseOptions options, CancellationToken cancellationToken = default) #

Parses a complete document and returns an immutable snapshot.

Parameters

source string required
options OfficeIMO.Html.Dom.HtmlParseOptions required
cancellationToken System.Threading.CancellationToken = default optional

Returns

HtmlDocument
public HtmlDocumentFragment ParseFragment(string source, HtmlElement contextElement, HtmlParseOptions options, CancellationToken cancellationToken = default) #

Parses source with the supplied element as the HTML fragment-parsing context. The returned fragment belongs to an independent owned document and can be inserted with HtmlDocument.ImportNode.

Parameters

source string required
contextElement OfficeIMO.Html.Dom.HtmlElement required
options OfficeIMO.Html.Dom.HtmlParseOptions required
cancellationToken System.Threading.CancellationToken = default optional

Returns

HtmlDocumentFragment

Properties

public static AngleSharpHtmlParser Instance { get; } #

Stateless default parser shared by conversion requests.

public string Id { get; } #

Identifies the parser implementation for diagnostics and reproducibility.