9.0 Released! → Native ESM runtimes 🚀, Vite support ⚡️, multi-window apps and more...
Read Announcement

Defined in: xml/index.ts

A simple non-validating SAX parser based on https://github.com/vflash/easysax version 0.1.14

Constructors

Constructor

ts
new XmlParser(
   onEvent: (event: ParserEvent) => void, 
   onError?: (error: Error, position: Position) => void, 
   processNamespaces?: boolean): XmlParser;

Defined in: xml/index.ts

Creates a new instance of the XmlParser class.

Parameters

ParameterTypeDescription
onEvent(event: ParserEvent) => voidThe callback to execute when a parser event occurs. The 'event' parameter contains information about the event.
onError?(error: Error, position: Position) => voidThe callback to execute when a parser error occurs. The 'error' parameter contains the error.
processNamespaces?booleanSpecifies whether namespaces should be processed.

Returns

XmlParser

Accessors

angularSyntax

Get Signature

ts
get angularSyntax(): boolean;

Defined in: xml/index.ts

Returns

boolean

Set Signature

ts
set angularSyntax(value: boolean): void;

Defined in: xml/index.ts

Parameters
ParameterType
valueboolean
Returns

void

Methods

parse()

ts
parse(xmlString: string): void;

Defined in: xml/index.ts

Parses the supplied xml string.

Parameters

ParameterTypeDescription
xmlStringstringThe string containing the xml to parse.

Returns

void

Previous
WrappedValue