public abstract class AbstractDocumentReader extends AbstractXmlReader implements DocumentReader
Modifier | Constructor and Description |
---|---|
protected |
AbstractDocumentReader(java.lang.Object rootElement) |
protected |
AbstractDocumentReader(java.lang.Object rootElement,
NameCoder nameCoder) |
protected |
AbstractDocumentReader(java.lang.Object rootElement,
XmlFriendlyReplacer replacer)
Deprecated.
As of 1.4, use
AbstractDocumentReader(Object, NameCoder) instead. |
Modifier and Type | Method and Description |
---|---|
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.util.Iterator |
getAttributeNames()
Iterator with the names of the attributes.
|
protected abstract java.lang.Object |
getChild(int index) |
protected abstract int |
getChildCount() |
java.lang.Object |
getCurrent()
Retrieve the current processed node of the DOM.
|
protected abstract java.lang.Object |
getParent() |
boolean |
hasMoreChildren()
Does the node have any more children remaining that have not yet been read?
|
void |
moveDown()
Select the current child as current node.
|
void |
moveUp()
Select the parent node as current node.
|
protected abstract void |
reassignCurrentElement(java.lang.Object current) |
escapeXmlName, unescapeXmlName
decodeAttribute, decodeNode, encodeAttribute, encodeNode, peekNextChild, underlyingReader
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttribute, getAttribute, getAttributeCount, getAttributeName, getNodeName, getValue, underlyingReader
protected AbstractDocumentReader(java.lang.Object rootElement)
protected AbstractDocumentReader(java.lang.Object rootElement, NameCoder nameCoder)
protected AbstractDocumentReader(java.lang.Object rootElement, XmlFriendlyReplacer replacer)
AbstractDocumentReader(Object, NameCoder)
instead.protected abstract void reassignCurrentElement(java.lang.Object current)
protected abstract java.lang.Object getParent()
protected abstract java.lang.Object getChild(int index)
protected abstract int getChildCount()
public boolean hasMoreChildren()
HierarchicalStreamReader
hasMoreChildren
in interface HierarchicalStreamReader
public void moveUp()
HierarchicalStreamReader
moveUp
in interface HierarchicalStreamReader
public void moveDown()
HierarchicalStreamReader
HierarchicalStreamReader.moveUp()
.moveDown
in interface 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.
getAttributeNames
in interface HierarchicalStreamReader
public void appendErrors(ErrorWriter errorWriter)
HierarchicalStreamReader
appendErrors
in interface ErrorReporter
appendErrors
in interface HierarchicalStreamReader
errorWriter
- the error writerpublic java.lang.Object getCurrent()
DocumentReader
getCurrent
in interface DocumentReader
public void close()
HierarchicalStreamReader
close
in interface HierarchicalStreamReader
Copyright © 2004–2024 XStream. All rights reserved.