ParserEvent | API - NativeScript
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
Returns a JSON object with the attributes of an element in case the eventType is ParserEventType.StartElement.
data
Returns the relevant data in case the eventType is ParserEventType.Text, ParserEventType.CDATA or ParserEventType.Comment.
elementName
Returns the name of the element in case the eventType is ParserEventType.StartElement or ParserEventType.EndElement.
eventType
Returns the type of the parser event. This is one of the ParserEventType static members.
namespace
If namespace processing is enabled, returns the namespace of the element in case the eventType is ParserEventType.StartElement or ParserEventType.EndElement.
position
Get the position in the xml string where the event was generated.
prefix
If namespace processing is enabled, returns the prefix of the element in case the eventType is ParserEventType.StartElement or ParserEventType.EndElement.
Methods
toString
Returns a JSON string representation of this instance.