Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CheerioParserOptions

Hierarchy

  • ParserOptions
  • DomHandlerOptions
    • CheerioParserOptions

Index

Properties

Optional Tokenizer

Tokenizer: typeof Tokenizer

Allows the default tokenizer to be overwritten.

Optional _useHtmlParser2

_useHtmlParser2: boolean

Optional decodeEntities

decodeEntities: boolean

Decode entities within the document.

default

true

Optional lowerCaseAttributeNames

lowerCaseAttributeNames: boolean

If set to true, all attribute names will be lowercased. This has noticeable impact on speed.

default

!xmlMode

Optional lowerCaseTags

lowerCaseTags: boolean

If set to true, all tags will be lowercased.

default

!xmlMode

Optional recognizeCDATA

recognizeCDATA: boolean

If set to true, CDATA sections will be recognized as text even if the xmlMode option is not enabled. NOTE: If xmlMode is set to true then CDATA sections will always be recognized as text.

default

xmlMode

Optional recognizeSelfClosing

recognizeSelfClosing: boolean

If set to true, self-closing tags will trigger the onclosetag event even if xmlMode is not set to true. NOTE: If xmlMode is set to true then self-closing tags will always be recognized.

default

xmlMode

Optional sourceCodeLocationInfo

sourceCodeLocationInfo: boolean

Enable location support for parse5

Optional withEndIndices

withEndIndices: boolean

Add an endIndex property to nodes. When the parser is used in a non-streaming fashion, endIndex is an integer indicating the position of the end of the node in the document.

default

false

Optional withStartIndices

withStartIndices: boolean

Add a startIndex property to nodes. When the parser is used in a non-streaming fashion, startIndex is an integer indicating the position of the start of the node in the document.

default

false

Optional xml

xml: (ParserOptions & DomHandlerOptions) | boolean

Optional xmlMode

xmlMode: boolean

Indicates whether special tags (<script>, <style>, and <title>) should get special treatment and if "empty" tags (eg. <br>) can have children. If false, the content of special tags will be text only. For feeds and other XML content (documents that don't consist of HTML), set this to true.

default

false

Generated using TypeDoc