Interface: HTMLParser2Options
Options accepted by htmlparser2, the default parser for XML.
See
https://github.com/fb55/htmlparser2/wiki/Parser-options
Extends
DomHandlerOptions
.ParserOptions
Properties
decodeEntities?
optional
decodeEntities:boolean
Decode entities within the document.
Default
true
Inherited from
HTMLParser2ParserOptions.decodeEntities
Defined in
node_modules/htmlparser2/lib/esm/Parser.d.ts:17
lowerCaseAttributeNames?
optional
lowerCaseAttributeNames:boolean
If set to true
, all attribute names will be lowercased. This has noticeable impact on speed.
Default
!xmlMode
Inherited from
HTMLParser2ParserOptions.lowerCaseAttributeNames
Defined in
node_modules/htmlparser2/lib/esm/Parser.d.ts:29
lowerCaseTags?
optional
lowerCaseTags:boolean
If set to true, all tags will be lowercased.
Default
!xmlMode
Inherited from
HTMLParser2ParserOptions.lowerCaseTags
Defined in
node_modules/htmlparser2/lib/esm/Parser.d.ts:23
recognizeCDATA?
optional
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
Inherited from
HTMLParser2ParserOptions.recognizeCDATA
Defined in
node_modules/htmlparser2/lib/esm/Parser.d.ts:36
recognizeSelfClosing?
optional
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
Inherited from
HTMLParser2ParserOptions.recognizeSelfClosing
Defined in
node_modules/htmlparser2/lib/esm/Parser.d.ts:43
Tokenizer?
optional
Tokenizer: typeofdefault
Allows the default tokenizer to be overwritten.
Inherited from
HTMLParser2ParserOptions.Tokenizer
Defined in
node_modules/htmlparser2/lib/esm/Parser.d.ts:47
withEndIndices?
optional
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
Inherited from
DomHandlerOptions.withEndIndices
Defined in
node_modules/domhandler/lib/esm/index.d.ts:19
withStartIndices?
optional
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
Inherited from
DomHandlerOptions.withStartIndices
Defined in
node_modules/domhandler/lib/esm/index.d.ts:11
xmlMode?
optional
xmlMode:boolean
Treat the markup as XML.
Default
false
Inherited from
DomHandlerOptions.xmlMode
Defined in
node_modules/domhandler/lib/esm/index.d.ts:25