| title | ParserEvent |
|---|---|
| titleTemplate | title - API / NativeScript |
| description | Provides information for a parser event. |
| contributors | false |
Defined in: xml/index.ts
Provides information for a parser event.
new ParserEvent(
eventType: string,
position: Position,
prefix?: string,
namespace?: string,
elementName?: string,
attributes?: Object,
data?: string): ParserEvent;Defined in: xml/index.ts
| Parameter | Type |
|---|---|
eventType |
string |
position |
Position |
prefix? |
string |
namespace? |
string |
elementName? |
string |
attributes? |
Object |
data? |
string |
ParserEvent
get attributes(): Object;Defined in: xml/index.ts
Returns a JSON object with the attributes of an element in case the eventType is ParserEventType.StartElement.
Object
get data(): string;Defined in: xml/index.ts
Returns the relevant data in case the eventType is ParserEventType.Text, ParserEventType.CDATA or ParserEventType.Comment.
string
get elementName(): string;Defined in: xml/index.ts
Returns the name of the element in case the eventType is ParserEventType.StartElement or ParserEventType.EndElement.
string
get eventType(): string;Defined in: xml/index.ts
Returns the type of the parser event. This is one of the ParserEventType static members.
string
get namespace(): string;Defined in: xml/index.ts
If namespace processing is enabled, returns the namespace of the element in case the eventType is ParserEventType.StartElement or ParserEventType.EndElement.
string
get position(): Position;Defined in: xml/index.ts
Get the position in the xml string where the event was generated.
Position
get prefix(): string;Defined in: xml/index.ts
If namespace processing is enabled, returns the prefix of the element in case the eventType is ParserEventType.StartElement or ParserEventType.EndElement.
string
toString(): string;Defined in: xml/index.ts
Returns a JSON string representation of this instance.
string