Overview
This class encapsulates the state of a Parser Event. Various attributes are set depending on the type of the current Event and the type of the document being processed.
Profile: common
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public-read package | arrayIndex | Integer | ![]() |
Index of the current Event in a JSON array. ![]() Index of the current Event in a JSON array. Valid for JSON. |
|||
public-read package | arrayLevel | Integer | ![]() |
Depth of the current Event in a JSON array. ![]() Depth of the current Event in a JSON array. Valid for JSON. |
|||
public-read package | booleanValue | Boolean | ![]() |
Value of a JSON boolean. ![]() Value of a JSON boolean. Valid for JSON. |
|||
public-read package | integerValue | Integer | ![]() |
Value of a JSON integer. ![]() Value of a JSON integer. Valid for JSON. |
|||
public-read package | level | Integer | ![]() |
The level at which the current Event occurs. ![]() The level at which the current Event occurs. The XML root element, for example, is at level 0. Valid for XML and JSON. |
|||
public-read package | name | String | ![]() |
The name of the current JSON object. ![]() The name of the current JSON object. Valid for JSON. |
|||
public-read package | numberValue | Number | ![]() |
Value of a JSON floating-point number. ![]() Value of a JSON floating-point number. Valid for JSON. |
|||
public-read package | qname | QName | ![]() |
The qualified name of the current XML element. ![]() The qualified name of the current XML element. Valid for XML. |
|||
public-read package | text | String | ![]() |
XML or JSON text. ![]() XML or JSON text. Valid for XML or JSON. |
|||
public-read package | type | Integer | ![]() |
The type of the current Event. ![]() The type of the current Event. This must be one of the types defined in PullParser. Valid for XML and JSON. |
|||
public-read package | typeName | String | ![]() |
A human-readable name of the Event type. ![]() A human-readable name of the Event type. Valid for XML and JSON. |
Inherited Variables
Function Summary
- public getAttributeNames() : <any>[]
-
Get the qualified names of XML attributes associated with the current element.
Get the qualified names of XML attributes associated with the current element.
-
Returns
- <any>[]
- a sequence of names of XML attributes associated with the current element. Will be empty if no attributes are associated with the current element. Valid for XML.
- public getAttributeValue(name: java.lang.Object) : java.lang.String
-
Retrieve the attribute value that maps to the specified attribute name.
Retrieve the attribute value that maps to the specified attribute name.
-
Parameters
- name
-
attribute name for which the value is desired. Must be one of the names returned by getAttributeNames(). May be a String if an unqualified match is desired, which is equivalent to
getAttributeValue(QName{name: name})
, otherwise a QName. Returns null if no value is mapped to the specified name.
-
Returns
- String
- public getNamespace(prefix: java.lang.String) : java.lang.String
-
Retrieve the namespace URI that currently maps to the specified prefix.
Retrieve the namespace URI that currently maps to the specified prefix.
-
Parameters
- prefix
-
prefix for which the currently mapped URI is desired. Must be one of the prefixes returned by getNamespacePrefixes(). Passing null or the empty string (
""
) retrieves the default namespace URI.
-
Returns
- String
- the namespace URI currenly bound to the specified prefix. Returns the empty string (<code>""</code>) if no URI is currently mapped to the specified prefix.
- public getNamespacePrefixes() : <any>[]
-
Get the prefixes of namespace definitions currently in scope.
Get the prefixes of namespace definitions currently in scope.
-
Returns
- <any>[]
- a sequence of prefixes of namespace definitions currently in scope. Will be empty if no namespace definitions are currently in scope. The prefix for the default namespace is the empty string (<code>""</code>). Valid for XML.
- public toString() : java.lang.String