StAXReaderWrapper
, XMLPullReaderFactory.XMLPullReader
public interface IXMLReader
Modifier and Type | Field | Description |
---|---|---|
static int |
CDSECT |
|
static int |
COMMENT |
|
static int |
DOCDECL |
|
static int |
END_DOCUMENT |
|
static int |
END_TAG |
|
static int |
ENTITY_REF |
|
static int |
IGNORABLE_WHITESPACE |
|
static int |
PROCESSING_INSTRUCTION |
|
static int |
START_DOCUMENT |
|
static int |
START_TAG |
|
static int |
TEXT |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
buildPositionString() |
Build current parse input position description.
|
int |
getAttributeCount() |
Get the number of attributes of the current start tag.
|
java.lang.String |
getAttributeName(int index) |
Get an attribute name from the current start tag.
|
java.lang.String |
getAttributeNamespace(int index) |
Get an attribute namespace from the current start tag.
|
java.lang.String |
getAttributePrefix(int index) |
Get an attribute prefix from the current start tag.
|
java.lang.String |
getAttributeValue(int index) |
Get an attribute value from the current start tag.
|
java.lang.String |
getAttributeValue(java.lang.String ns,
java.lang.String name) |
Get an attribute value from the current start tag.
|
int |
getColumnNumber() |
Get current source column number.
|
java.lang.String |
getDocumentName() |
Get document name.
|
int |
getEventType() |
Gets the current parse event type, without changing the current parse
state.
|
java.lang.String |
getInputEncoding() |
Return the input encoding, if known.
|
int |
getLineNumber() |
Get current source line number.
|
java.lang.String |
getName() |
Get element name from the current start or end tag.
|
java.lang.String |
getNamespace() |
Get element namespace from the current start or end tag.
|
java.lang.String |
getNamespace(java.lang.String prefix) |
Get namespace URI associated with prefix.
|
int |
getNamespaceCount(int depth) |
Get number of namespace declarations active at depth.
|
java.lang.String |
getNamespacePrefix(int index) |
Get namespace prefix.
|
java.lang.String |
getNamespaceUri(int index) |
Get namespace URI.
|
int |
getNestingDepth() |
Get current element nesting depth.
|
java.lang.String |
getPrefix() |
Get element prefix from the current start or end tag.
|
java.lang.String |
getText() |
Get current text.
|
void |
init() |
Initialize reader.
|
boolean |
isNamespaceAware() |
Return namespace processing flag.
|
int |
next() |
Advance to next binding component of input document.
|
int |
nextToken() |
Advance to next parse event of input document.
|
static final int START_DOCUMENT
static final int END_DOCUMENT
static final int START_TAG
static final int END_TAG
static final int TEXT
static final int CDSECT
static final int ENTITY_REF
static final int IGNORABLE_WHITESPACE
static final int PROCESSING_INSTRUCTION
static final int COMMENT
static final int DOCDECL
void init() throws java.io.IOException
java.io.IOException
java.lang.String buildPositionString()
int nextToken() throws JiBXException
JiBXException
- if error reading or parsing documentint next() throws JiBXException
nextToken()
, which consolidates text
content and ignores parse events for components such as comments and PIs.JiBXException
- if error reading or parsing documentint getEventType() throws JiBXException
JiBXException
- if error parsing documentjava.lang.String getName()
java.lang.IllegalStateException
- if not at a start or end tag (optional)java.lang.String getNamespace()
java.lang.IllegalStateException
- if not at a start or end tag (optional)java.lang.String getPrefix()
null
if no prefix)java.lang.IllegalStateException
- if not at a start or end tagint getAttributeCount()
java.lang.IllegalStateException
- if not at a start tag (optional)java.lang.String getAttributeName(int index)
index
- attribute indexjava.lang.IllegalStateException
- if not at a start tag or invalid indexjava.lang.String getAttributeNamespace(int index)
index
- attribute indexjava.lang.IllegalStateException
- if not at a start tag or invalid indexjava.lang.String getAttributePrefix(int index)
index
- attribute indexnull
if no prefix present)java.lang.IllegalStateException
- if not at a start tag or invalid indexjava.lang.String getAttributeValue(int index)
index
- attribute indexjava.lang.IllegalStateException
- if not at a start tag or invalid indexjava.lang.String getAttributeValue(java.lang.String ns, java.lang.String name)
ns
- namespace URI for expected attribute (may be null
or the empty string for the empty namespace)name
- attribute name expectednull
if missingjava.lang.IllegalStateException
- if not at a start tagjava.lang.String getText()
int getNestingDepth()
int getNamespaceCount(int depth)
depth
- element nesting depthjava.lang.IllegalArgumentException
- if invalid depthjava.lang.String getNamespaceUri(int index)
index
- declaration indexjava.lang.IllegalArgumentException
- if invalid indexjava.lang.String getNamespacePrefix(int index)
index
- declaration indexnull
if a default namespacejava.lang.IllegalArgumentException
- if invalid indexjava.lang.String getDocumentName()
null
if not knownint getLineNumber()
-1
if line number
information not availableint getColumnNumber()
-1
if column
number information not availablejava.lang.String getNamespace(java.lang.String prefix)
prefix
- namespace prefix to be matched (null
for
default namespace)null
if prefix not defined)java.lang.String getInputEncoding()
null
if unknown)boolean isNamespaceAware()
true
if namespaces are
processed by reader, false
if not)