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 | ![]() | 0 |
Index of the current Event in a JSON array. ![]() Index of the current Event in a JSON array. Valid for JSON. 0 |
||
public-read package | arrayLevel | Integer | ![]() | 0 |
Depth of the current Event in a JSON array. ![]() Depth of the current Event in a JSON array. Valid for JSON. 0 |
||
public-read package | booleanValue | Boolean | ![]() | false |
Value of a JSON boolean. ![]() Value of a JSON boolean. Valid for JSON. false |
||
public-read package | exception | Exception | ![]() | null |
Holds an Exception if a value parsing error occured. ![]() Holds an Exception if a value parsing error occured. In this case, depending on type, integerValue or numberValue will contain an undefined value. null
See Also:
|
||
public-read package | integerValue | Long | ![]() | 0 |
Value of a JSON integer. ![]() Value of a JSON integer. Valid for JSON.
Holds the integer value for the current JSON object
if type contains the value
PullParser.INTEGER and
exception contains the value
See Also:
|
||
public-read package | level | Integer | ![]() | 0 |
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. 0 |
||
public-read package | name | String | ![]() | null |
The name of the current JSON object. ![]() The name of the current JSON object. Valid for JSON. null |
||
public-read package | numberValue | Number | ![]() | 0.0 |
Value of a JSON floating-point number. ![]() Value of a JSON floating-point number. Valid for JSON.
Holds the floating-point value for the current JSON object
if type contains the value
PullParser.NUMBER and
exception contains the value
See Also:
|
||
public-read package | qname | QName | ![]() | null |
The qualified name of the current XML element. ![]() The qualified name of the current XML element. Valid for XML. null |
||
public-read package | text | String | ![]() | null |
XML or JSON text. ![]() XML or JSON text. Valid for XML or JSON. null |
||
public-read package | type | Integer | ![]() | 0 |
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. 0 |
||
public-read package | typeName | String | ![]() | "UNKNOWN" |
A human-readable name of the Event type. ![]() A human-readable name of the Event type. Valid for XML and JSON. "UNKNOWN" |
Inherited Variables
Function Summary
- public getAttributeNames() : QName[]
-
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
- QName[]
- 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() : java.lang.String[]
-
Get the prefixes of namespace definitions currently in scope.
Get the prefixes of namespace definitions currently in scope.
-
Returns
- String[]
- 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