Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Interface

IHtmlParserProvider

OfficeIMO.Html.Dom

Namespace
OfficeIMO.Html.Dom
Assembly
OfficeIMO.Html.Core
Source revision
ba882f6b0d07 with working tree changes
Modifiers
abstract

Parses inert HTML into an owned document. Implementations must perform no resource loading or script execution.

Methods

public abstract 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
public abstract 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

Properties

public abstract string Id { get; } #

Identifies the parser implementation for diagnostics and reproducibility.