Top Fields Constructors Methods
com.thoughtworks.xstream.io.xml

public Class XomReader

extends AbstractDocumentReader
Class Inheritance
Imports
com.thoughtworks.xstream.io.naming.NameCoder, nu.xom.Document, .Element, .Elements, .Node, .Text

Deprecated

as a consequence of AbstractDocumentReader being deprecated. See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
private Element

Constructor Summary

AccessConstructor and Description
public
XomReader(Element rootElement)

public
XomReader(Document document)

public
XomReader(Element rootElement, NameCoder nameCoder)

public
XomReader(Document document, NameCoder nameCoder)

public
XomReader(Element rootElement, XmlFriendlyReplacer replacer)

Deprecated As of 1.4 use XomReader#XomReader(Element, NameCoder) instead.
public
XomReader(Document document, XmlFriendlyReplacer replacer)

Deprecated As of 1.4 use XomReader#XomReader(Element, NameCoder) instead.

Method Summary

Modifier and TypeMethod and Description
public String
getAttribute(String name)

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttribute.

Get the value of an attribute of the current node.
public String
getAttribute(int index)

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttribute.

Get the value of an attribute of the current node, by index.
public int
public String
getAttributeName(int index)

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttributeName.

Name of attribute in current node.
protected Object
protected int
public String
protected Object
public String
getValue()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.getValue.

Get the value (text content) of the current node.
public String
protected void
Inherited from com.thoughtworks.xstream.io.xml.AbstractDocumentReader:
appendErrorsclosegetAttributeNamesgetCurrenthasMoreChildrenmoveDownmoveUp

Field Detail

currentElementback to summary
private Element currentElement

Constructor Detail

XomReaderback to summary
public XomReader(Element rootElement)
XomReaderback to summary
public XomReader(Document document)
XomReaderback to summary
public XomReader(Element rootElement, NameCoder nameCoder)
Since
1.4
XomReaderback to summary
public XomReader(Document document, NameCoder nameCoder)
Since
1.4
XomReaderback to summary
public XomReader(Element rootElement, XmlFriendlyReplacer replacer)

Deprecated

As of 1.4 use XomReader#XomReader(Element, NameCoder) instead.

Since
1.2
XomReaderback to summary
public XomReader(Document document, XmlFriendlyReplacer replacer)

Deprecated

As of 1.4 use XomReader#XomReader(Element, NameCoder) instead.

Since
1.2

Method Detail

getAttributeback to summary
public String getAttribute(String name)

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttribute.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttribute.

Get the value of an attribute of the current node.

If no such attribute exists, the method returns null.

getAttributeback to summary
public String getAttribute(int index)

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttribute.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttribute.

Get the value of an attribute of the current node, by index.

Note, 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.

getAttributeCountback to summary
public int getAttributeCount()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttributeCount.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttributeCount.

Number of attributes in current node.

getAttributeNameback to summary
public String getAttributeName(int index)

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttributeName.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttributeName.

Name of attribute in current node.

Note, 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.

getChildback to summary
protected Object getChild(int index)

Implements abstract com.thoughtworks.xstream.io.xml.AbstractDocumentReader.getChild.

getChildCountback to summary
protected int getChildCount()

Implements abstract com.thoughtworks.xstream.io.xml.AbstractDocumentReader.getChildCount.

getNodeNameback to summary
public String getNodeName()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.getNodeName.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamReader.getNodeName.

Get the name of the current node.

getParentback to summary
protected Object getParent()

Implements abstract com.thoughtworks.xstream.io.xml.AbstractDocumentReader.getParent.

getValueback to summary
public String getValue()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.getValue.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamReader.getValue.

Get the value (text content) of the current node.

peekNextChildback to summary
public String peekNextChild()

Overrides com.thoughtworks.xstream.io.AbstractReader.peekNextChild.

Implements com.thoughtworks.xstream.io.ExtendedHierarchicalStreamReader.peekNextChild.

Doc from com.thoughtworks.xstream.io.ExtendedHierarchicalStreamReader.peekNextChild.

Peek the name of the next child. In situation where hasMoreChildren() returns true, peek the tag name of the child.

reassignCurrentElementback to summary
protected void reassignCurrentElement(Object current)

Implements abstract com.thoughtworks.xstream.io.xml.AbstractDocumentReader.reassignCurrentElement.