public class StaxReader extends AbstractPullReader
COMMENT, END_NODE, OTHER, START_NODE, TEXT| Constructor and Description |
|---|
StaxReader(QNameMap qnameMap,
javax.xml.stream.XMLStreamReader in) |
StaxReader(QNameMap qnameMap,
javax.xml.stream.XMLStreamReader in,
NameCoder replacer) |
StaxReader(QNameMap qnameMap,
javax.xml.stream.XMLStreamReader in,
XmlFriendlyReplacer replacer)
Deprecated.
As of 1.4 use
StaxReader(QNameMap, XMLStreamReader, NameCoder) instead. |
| Modifier and Type | Method and Description |
|---|---|
void |
appendErrors(ErrorWriter errorWriter)
Append context information to an
ErrorWriter. |
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.
|
getAttributeNames, getNodeName, getValue, hasMoreChildren, mark, moveDown, moveUp, peekNextChild, resetescapeXmlName, unescapeXmlNamedecodeAttribute, decodeNode, encodeAttribute, encodeNode, underlyingReaderpublic StaxReader(QNameMap qnameMap, javax.xml.stream.XMLStreamReader in)
public StaxReader(QNameMap qnameMap, javax.xml.stream.XMLStreamReader in, NameCoder replacer)
public StaxReader(QNameMap qnameMap, javax.xml.stream.XMLStreamReader in, XmlFriendlyReplacer replacer)
StaxReader(QNameMap, XMLStreamReader, NameCoder) instead.protected int pullNextEvent()
AbstractPullReaderThis 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 AbstractPullReaderprotected java.lang.String pullElementName()
AbstractPullReaderpullElementName in class AbstractPullReaderprotected java.lang.String pullText()
AbstractPullReaderpullText in class AbstractPullReaderpublic java.lang.String getAttribute(java.lang.String name)
HierarchicalStreamReaderIf no such attribute exists, the method returns null.
public java.lang.String getAttribute(int index)
HierarchicalStreamReaderNote, the behavior of this method is dependent on the underlying parser when calling it with a non-existing index. Typically some kind of RuntimeException is thrown.
public int getAttributeCount()
HierarchicalStreamReaderpublic java.lang.String getAttributeName(int index)
HierarchicalStreamReaderNote, the behavior of this method is dependent on the underlying parser when calling it with a non-existing index. Typically some kind of RuntimeException is thrown.
public void appendErrors(ErrorWriter errorWriter)
ErrorReporterErrorWriter.errorWriter - the error writerpublic void close()
HierarchicalStreamReaderCopyright © 2004–2024 XStream. All rights reserved.