public abstract class AbstractDocumentReader extends AbstractXmlReader implements DocumentReader
Modifier | Constructor and Description |
---|---|
protected |
AbstractDocumentReader(Object rootElement) |
protected |
AbstractDocumentReader(Object rootElement,
NameCoder nameCoder) |
protected |
AbstractDocumentReader(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.
|
Iterator |
getAttributeNames()
Iterator with the names of the attributes.
|
protected abstract Object |
getChild(int index) |
protected abstract int |
getChildCount() |
Object |
getCurrent()
Retrieve the current processed node of the DOM.
|
protected abstract 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(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(Object rootElement)
protected AbstractDocumentReader(Object rootElement, NameCoder nameCoder)
protected AbstractDocumentReader(Object rootElement, XmlFriendlyReplacer replacer)
AbstractDocumentReader(Object, NameCoder)
instead.protected abstract void reassignCurrentElement(Object current)
protected abstract Object getParent()
protected abstract 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 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 Object getCurrent()
DocumentReader
getCurrent
in interface DocumentReader
public void close()
HierarchicalStreamReader
close
in interface HierarchicalStreamReader
Copyright © 2004–2017 XStream. All rights reserved.