Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface HTMLParser2Options

Options accepted by htmlparser2, the default parser for XML.

see

https://github.com/fb55/htmlparser2/wiki/Parser-options

Hierarchy

Index

Properties

Tokenizer?: typeof default

Allows the default tokenizer to be overwritten.

decodeEntities?: boolean

Decode entities within the document.

default

true

lowerCaseAttributeNames?: boolean

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

default

!xmlMode

lowerCaseTags?: boolean

If set to true, all tags will be lowercased.

default

!xmlMode

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

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

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

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

xmlMode?: boolean

Treat the markup as XML.

default

false