Help prepare for 2025 → Answer 8 simple questions on our Fall Survey
Open Survey
XmlParser
A simple non-validating SAX parser based on https://github.com/vflash/easysax version 0.1.14

Summary

Constructors

constructor

Methods

parse

Constructors

constructor

new XmlParser(onEvent: (event: ParserEvent) => void, onError?: (error: Error, position: Position) => void, processNamespaces?: boolean, angularSyntax?: boolean): XmlParser
Creates a new instance of the XmlParser class.
Parameter Default Description
onEvent
(event: ParserEvent) => void

The callback to execute when a parser event occurs. The 'event' parameter contains information about the event.

onError
(error: Error, position: Position) => void

The callback to execute when a parser error occurs. The 'error' parameter contains the error.

processNamespaces
boolean

Specifies whether namespaces should be processed.

angularSyntax
boolean

Returns XmlParser

Methods

parse

parse(xmlString: string): void
Parses the supplied xml string.
Parameter Default Description
xmlString
string

The string containing the xml to parse.

Returns void
Previous
WrappedValue