public abstract class AbstractPullReader extends AbstractXmlReader
Modifier and Type | Field and Description |
---|---|
protected static int |
COMMENT |
protected static int |
END_NODE |
protected static int |
OTHER |
protected static int |
START_NODE |
protected static int |
TEXT |
Modifier | Constructor and Description |
---|---|
protected |
AbstractPullReader(NameCoder nameCoder) |
protected |
AbstractPullReader(XmlFriendlyReplacer replacer)
Deprecated.
As of 1.4 use
AbstractPullReader(NameCoder) instead |
Modifier and Type | Method and Description |
---|---|
java.util.Iterator |
getAttributeNames()
Iterator with the names of the attributes.
|
java.lang.String |
getNodeName()
Get the name of the current node.
|
java.lang.String |
getValue()
Get the value (text content) of the current node.
|
boolean |
hasMoreChildren()
Does the node have any more children remaining that have not yet been read?
|
void |
mark() |
void |
moveDown()
Select the current child as current node.
|
void |
moveUp()
Select the parent node as current node.
|
java.lang.String |
peekNextChild()
Peek the name of the next child.
|
protected abstract java.lang.String |
pullElementName()
Pull the name of the current element from the stream.
|
protected abstract int |
pullNextEvent()
Pull the next event from the stream.
|
protected abstract java.lang.String |
pullText()
Pull the contents of the current text node from the stream.
|
void |
reset() |
escapeXmlName, unescapeXmlName
decodeAttribute, decodeNode, encodeAttribute, encodeNode, underlyingReader
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendErrors, close, getAttribute, getAttribute, getAttributeCount, getAttributeName
protected static final int START_NODE
protected static final int END_NODE
protected static final int TEXT
protected static final int COMMENT
protected static final int OTHER
protected AbstractPullReader(NameCoder nameCoder)
protected AbstractPullReader(XmlFriendlyReplacer replacer)
AbstractPullReader(NameCoder)
insteadprotected abstract int pullNextEvent()
This MUST return START_NODE
, END_NODE
, TEXT
, COMMENT
,
OTHER
or throw StreamException
.
The underlying pull parser will most likely return its own event types. These must be mapped to the appropriate events.
protected abstract java.lang.String pullElementName()
protected abstract java.lang.String pullText()
public boolean hasMoreChildren()
HierarchicalStreamReader
public void moveDown()
HierarchicalStreamReader
HierarchicalStreamReader.moveUp()
.public void moveUp()
HierarchicalStreamReader
public void mark()
public void reset()
public java.lang.String getValue()
HierarchicalStreamReader
public java.util.Iterator getAttributeNames()
HierarchicalStreamReader
Note, the iterator is only valid as long as the internal state of the underlying parser is still at the start of the current element. The behavior is undefined if the parser moved on.
public java.lang.String getNodeName()
HierarchicalStreamReader
public java.lang.String peekNextChild()
ExtendedHierarchicalStreamReader
HierarchicalStreamReader.hasMoreChildren()
returns
true, peek the tag name of the child.peekNextChild
in interface ExtendedHierarchicalStreamReader
peekNextChild
in class AbstractReader
Copyright © 2004–2024 XStream. All rights reserved.