Class HtmlReadOptions
Format-specific settings for HtmlReader.
public sealed class HtmlReadOptions
- Inheritance
-
HtmlReadOptions
- Inherited Members
Remarks
These live on the reader rather than on DocumentReadOptions
because the core seam never widens for a format. It is the same shape
ImageRenderOptions uses for the imaging renderer: format-specific settings belong to
the format package, and the interface stays as it was.
Constructors
Fields
- DefaultMaxNestingDepth
The default nesting limit, deep enough for any hand-authored page.
Properties
- ApplyStyleElements
Gets or sets a value indicating whether
<style>elements are honoured. True by default. Setting it false reads a document with inlinestyleattributes only, which is what a caller sanitizing untrusted input usually wants.
- BaseUri
Gets or sets the base URI that relative references resolve against, used when the document has no
<base href>of its own. A document's own<base>wins.
- Encoding
Gets or sets the encoding to decode the input with, overriding both the byte-order mark and any
<meta charset>declaration. Null (the default) runs the documented detection order: explicit option, then BOM, thenmeta, then UTF-8.
- MapHeadingsToStyles
Gets or sets a value indicating whether an
<h1>to<h6>element maps to the matching built-inHeading Nparagraph style. True by default. When false the heading's own formatting is applied directly instead, which keeps a document self-describing at the cost of losing the outline structure.
- MaxNestingDepth
Gets or sets the maximum element nesting depth. Exceeding it throws a ResourceLimitExceededException rather than recursing: deeply nested tag soup is a classic stack-overflow vector, and an overflow is not catchable.
- ResourceResolver
Gets or sets the resolver for referenced resources. Null (the default) means references that are not data URIs are reported and dropped; DocWright never fetches on its own.