|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.thoughtworks.xstream.io.xml.AbstractXmlReader
com.thoughtworks.xstream.io.xml.AbstractPullReader
com.thoughtworks.xstream.io.xml.StaxReader
public class StaxReader
A reader using the StAX API.
Field Summary |
---|
Fields inherited from class com.thoughtworks.xstream.io.xml.AbstractPullReader |
---|
COMMENT, END_NODE, OTHER, START_NODE, TEXT |
Constructor Summary | |
---|---|
StaxReader(QNameMap qnameMap,
javax.xml.stream.XMLStreamReader in)
|
|
StaxReader(QNameMap qnameMap,
javax.xml.stream.XMLStreamReader in,
XmlFriendlyReplacer replacer)
|
Method Summary | |
---|---|
void |
appendErrors(ErrorWriter errorWriter)
If any errors are detected, allow the reader to add any additional information that can aid debugging (such as line numbers, XPath expressions, etc). |
void |
close()
Close the reader, if necessary. |
java.lang.String |
getAttribute(int index)
Get the value of an attribute of the current node, by index. |
java.lang.String |
getAttribute(java.lang.String name)
Get the value of an attribute of the current node. |
int |
getAttributeCount()
Number of attributes in current node. |
java.lang.String |
getAttributeName(int index)
Name of attribute in current node. |
protected java.lang.String |
pullElementName()
Pull the name of the current element from the stream. |
protected int |
pullNextEvent()
Pull the next event from the stream. |
protected java.lang.String |
pullText()
Pull the contents of the current text node from the stream. |
Methods inherited from class com.thoughtworks.xstream.io.xml.AbstractPullReader |
---|
getAttributeNames, getNodeName, getValue, hasMoreChildren, mark, moveDown, moveUp, peekNextChild, reset, underlyingReader |
Methods inherited from class com.thoughtworks.xstream.io.xml.AbstractXmlReader |
---|
escapeXmlName, unescapeXmlName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StaxReader(QNameMap qnameMap, javax.xml.stream.XMLStreamReader in)
public StaxReader(QNameMap qnameMap, javax.xml.stream.XMLStreamReader in, XmlFriendlyReplacer replacer)
Method Detail |
---|
protected int pullNextEvent()
AbstractPullReader
This MUST return AbstractPullReader.START_NODE
, AbstractPullReader.END_NODE
, AbstractPullReader.TEXT
, AbstractPullReader.COMMENT
,
AbstractPullReader.OTHER
or throw StreamException
.
The underlying pull parser will most likely return its own event types. These must be mapped to the appropriate events.
pullNextEvent
in class AbstractPullReader
protected java.lang.String pullElementName()
AbstractPullReader
pullElementName
in class AbstractPullReader
protected java.lang.String pullText()
AbstractPullReader
pullText
in class AbstractPullReader
public java.lang.String getAttribute(java.lang.String name)
HierarchicalStreamReader
public java.lang.String getAttribute(int index)
HierarchicalStreamReader
public int getAttributeCount()
HierarchicalStreamReader
public java.lang.String getAttributeName(int index)
HierarchicalStreamReader
public void appendErrors(ErrorWriter errorWriter)
HierarchicalStreamReader
public void close()
HierarchicalStreamReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |