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

public Class JDomReader

extends AbstractDocumentReader
Class Inheritance
Imports
com.thoughtworks.xstream.io.naming.NameCoder, java.util.List, org.jdom.Attribute, .Document, .Element

Deprecated

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

Author
Laurent Bihanic

Field Summary

Modifier and TypeField and Description
private Element

Constructor Summary

AccessConstructor and Description
public
public
JDomReader(Document document)

public
JDomReader(Element root, NameCoder nameCoder)

public
JDomReader(Document document, NameCoder nameCoder)

public
JDomReader(Element root, XmlFriendlyReplacer replacer)

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

Deprecated As of 1.4, use JDomReader#JDomReader(Document, 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

JDomReaderback to summary
public JDomReader(Element root)
JDomReaderback to summary
public JDomReader(Document document)
JDomReaderback to summary
public JDomReader(Element root, NameCoder nameCoder)
Since
1.4
JDomReaderback to summary
public JDomReader(Document document, NameCoder nameCoder)
Since
1.4
JDomReaderback to summary
public JDomReader(Element root, XmlFriendlyReplacer replacer)

Deprecated

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

Since
1.2
JDomReaderback to summary
public JDomReader(Document document, XmlFriendlyReplacer replacer)

Deprecated

As of 1.4, use JDomReader#JDomReader(Document, 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.