8.6 Released with 🥽 visionOS support and more!
Check it out
ParserEvent
interface ParserEvent {
  attributes: Object;
  data: string;
  elementName: string;
  eventType: string;
  namespace: string;
  position: Position;
  prefix: string;
  toString(): string;
}
Provides information for a parser event.

Summary ​

Properties ​

attributes ​

attributes?: Object
Returns a JSON object with the attributes of an element in case the eventType is ParserEventType.StartElement.

data ​

data?: string
Returns the relevant data in case the eventType is ParserEventType.Text, ParserEventType.CDATA or ParserEventType.Comment.

elementName ​

elementName?: string
Returns the name of the element in case the eventType is ParserEventType.StartElement or ParserEventType.EndElement.

eventType ​

eventType: string
Returns the type of the parser event. This is one of the ParserEventType static members.

namespace ​

namespace?: string
If namespace processing is enabled, returns the namespace of the element in case the eventType is ParserEventType.StartElement or ParserEventType.EndElement.

position ​

position: Position
Get the position in the xml string where the event was generated.

prefix ​

prefix?: string
If namespace processing is enabled, returns the prefix of the element in case the eventType is ParserEventType.StartElement or ParserEventType.EndElement.

Methods ​

toString ​

toString(): string
Returns a JSON string representation of this instance.
Returns string