SaaS CMS has officially launched! Learn more now.

Class ParserOptions

Controls the behavior of the HtmlStreamParser by configuring specific features.

Inheritance
System.Object
ParserOptions
Namespace: EPiServer.HtmlParsing
Assembly: EPiServer.Framework.dll
Version: 12.0.3
Syntax
public sealed class ParserOptions : Enum

Fields

DefaultOptions

The default set of options, will create modern HTML that is basically XHTML compliant.

Declaration
public const ParserOptions DefaultOptions
Field Value
Type Description
ParserOptions

EnableCallbackOnEndElement

Set this option to enable callbacks when an end element is found. The callback is set on the CallbackOnEndElement property when the start element is found.

Declaration
public const ParserOptions EnableCallbackOnEndElement
Field Value
Type Description
ParserOptions

EnforceDocumentStructure

Set this option to indicate that you want the parser to correct unbalanced elements.

Declaration
public const ParserOptions EnforceDocumentStructure
Field Value
Type Description
ParserOptions

EnforceElementSemantics

Set this option to let HTML parser enforce HTML element semantics, for example not allowing block elements within a p element. Note - This is not yet implemented.

Declaration
public const ParserOptions EnforceElementSemantics
Field Value
Type Description
ParserOptions

EnforceEmptyContentModel

Set this option to enforce empty elements when content model for element is EMPTY.

Declaration
public const ParserOptions EnforceEmptyContentModel
Field Value
Type Description
ParserOptions

HtmlOptions

Option set that will allow "old style" HTML to be generated (unbalanced elements etc).

Declaration
public const ParserOptions HtmlOptions
Field Value
Type Description
ParserOptions

None

The resulting fragments will be as close as possible to the original input stream.

Declaration
public const ParserOptions None
Field Value
Type Description
ParserOptions

ObeyDocumentTypeDirective

Set this option to dynamically set the parser options based on the DOCTYPE directive in the HTML stream, if it exists.

Declaration
public const ParserOptions ObeyDocumentTypeDirective
Field Value
Type Description
ParserOptions

SimpleEnumeratorMask

Declaration
public const ParserOptions SimpleEnumeratorMask
Field Value
Type Description
ParserOptions

TagNamesToLower

Set this option to automatically fold element names to lower case.

Declaration
public const ParserOptions TagNamesToLower
Field Value
Type Description
ParserOptions

TagNamesToUpper

Set this option to automatically fold element names to upper case.

Declaration
public const ParserOptions TagNamesToUpper
Field Value
Type Description
ParserOptions

TrimEmptyElements

Set this option to automatically remove empty elements from the HTML stream that do not effect visual presentation.

Declaration
public const ParserOptions TrimEmptyElements
Field Value
Type Description
ParserOptions

value__

Declaration
public int value__
Field Value
Type Description
System.Int32

XhtmlOptions

Option set that will produce modern HTML that is basically XHTML compliant.

Declaration
public const ParserOptions XhtmlOptions
Field Value
Type Description
ParserOptions

Extension Methods