org.apache.batik.dom

Class AbstractDocument.XPathExpr.Result

public class AbstractDocument.XPathExpr.Result extends Object implements XPathResult

XPathResult implementation. XXX Namespace nodes are not handled correctly, since Xalan returns namespace nodes as simply the attribute node that caused the namespace to be in scope on the element in question. Thus it is impossible to tell the difference between a selected attribute that begins with 'xmlns' and an XPath namespace node.
Field Summary
protected booleanbooleanValue
The boolean value.
protected NodeListiterator
The NodeList for iterators.
protected intiteratorPosition
The position of the iterator.
protected doublenumberValue
The number value.
protected shortresultType
The result type.
protected NodesingleNodeValue
The single node value.
protected StringstringValue
The string value.
Constructor Summary
Result(Node n, short type)
Creates a new single node Result object.
Result(boolean b)
Creates a new boolean Result object.
Result(double d)
Creates a new number Result object.
Result(String s)
Creates a new string Result object.
Result(NodeList nl, short type)
Creates a new node iterator Result object.
Method Summary
booleangetBooleanValue()
Gets the boolean value.
booleangetInvalidIteratorState()
Returns whether the iterator has been invalidated by document modifications.
doublegetNumberValue()
Gets the number value.
shortgetResultType()
Gets the result type.
NodegetSingleNodeValue()
Gets the single node value.
intgetSnapshotLength()
Returns the length of the snapshot.
StringgetStringValue()
Gets the string value.
NodeiterateNext()
DOM: Implement org.w3c.dom.xpath.XPathResult#iterateNext().
NodesnapshotItem(int i)
Returns the ith item in the snapshot.

Field Detail

booleanValue

protected boolean booleanValue
The boolean value.

iterator

protected NodeList iterator
The NodeList for iterators.

iteratorPosition

protected int iteratorPosition
The position of the iterator.

numberValue

protected double numberValue
The number value.

resultType

protected short resultType
The result type.

singleNodeValue

protected Node singleNodeValue
The single node value.

stringValue

protected String stringValue
The string value.

Constructor Detail

Result

public Result(Node n, short type)
Creates a new single node Result object.

Result

public Result(boolean b)
Creates a new boolean Result object.

Result

public Result(double d)
Creates a new number Result object.

Result

public Result(String s)
Creates a new string Result object.

Result

public Result(NodeList nl, short type)
Creates a new node iterator Result object.

Method Detail

getBooleanValue

public boolean getBooleanValue()
Gets the boolean value.

getInvalidIteratorState

public boolean getInvalidIteratorState()
Returns whether the iterator has been invalidated by document modifications.

getNumberValue

public double getNumberValue()
Gets the number value.

getResultType

public short getResultType()
Gets the result type.

getSingleNodeValue

public Node getSingleNodeValue()
Gets the single node value.

getSnapshotLength

public int getSnapshotLength()
Returns the length of the snapshot.

getStringValue

public String getStringValue()
Gets the string value.

iterateNext

public Node iterateNext()
DOM: Implement org.w3c.dom.xpath.XPathResult#iterateNext().

snapshotItem

public Node snapshotItem(int i)
Returns the ith item in the snapshot.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.