## org.apache.batik.dom
Class AbstractDocument.XPathExpr.Result

    java.lang.Object
      org.apache.batik.dom.AbstractDocument.XPathExpr.Result

All Implemented Interfaces:
  org.w3c.dom.xpath.XPathResult

Enclosing class:
  AbstractDocument.XPathExpr

    public class AbstractDocument.XPathExpr.Result

extends java.lang.Object
implements org.w3c.dom.xpath.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 boolean` `booleanValue` The boolean value.
`protected org.w3c.dom.NodeList` `iterator` The NodeList for iterators.
`protected int` `iteratorPosition` The position of the iterator.
`protected double` `numberValue` The number value.
`protected short` `resultType` The result type.
`protected org.w3c.dom.Node` `singleNodeValue` The single node value.
`protected java.lang.String` `stringValue` The string value.

Fields inherited from interface org.w3c.dom.xpath.XPathResult
`ANY_TYPE, ANY_UNORDERED_NODE_TYPE, BOOLEAN_TYPE, FIRST_ORDERED_NODE_TYPE, NUMBER_TYPE, ORDERED_NODE_ITERATOR_TYPE, ORDERED_NODE_SNAPSHOT_TYPE, STRING_TYPE, UNORDERED_NODE_ITERATOR_TYPE, UNORDERED_NODE_SNAPSHOT_TYPE`

Constructor Summary
`AbstractDocument.XPathExpr.Result(boolean b)` Creates a new boolean Result object.
`AbstractDocument.XPathExpr.Result(double d)` Creates a new number Result object.
`AbstractDocument.XPathExpr.Result(org.w3c.dom.NodeList nl, short type)` Creates a new node iterator Result object.
`AbstractDocument.XPathExpr.Result(org.w3c.dom.Node n, short type)` Creates a new single node Result object.
`AbstractDocument.XPathExpr.Result(java.lang.String s)` Creates a new string Result object.

Method Summary
`boolean` `getBooleanValue()` Gets the boolean value.
`boolean` `getInvalidIteratorState()` Returns whether the iterator has been invalidated by document modifications.
`double` `getNumberValue()` Gets the number value.
`short` `getResultType()` Gets the result type.
`org.w3c.dom.Node` `getSingleNodeValue()` Gets the single node value.
`int` `getSnapshotLength()` Returns the length of the snapshot.
`java.lang.String` `getStringValue()` Gets the string value.
`org.w3c.dom.Node` `iterateNext()` DOM: Implement `XPathResult.iterateNext()`.
`org.w3c.dom.Node` `snapshotItem(int i)` Returns the `i`th item in the snapshot.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### resultType

    protected short resultType

  The result type.

### numberValue

    protected double numberValue

  The number value.

### stringValue

    protected java.lang.String stringValue

  The string value.

### booleanValue

    protected boolean booleanValue

  The boolean value.

### singleNodeValue

    protected org.w3c.dom.Node singleNodeValue

  The single node value.

### iterator

    protected org.w3c.dom.NodeList iterator

  The NodeList for iterators.

### iteratorPosition

    protected int iteratorPosition

  The position of the iterator.

Constructor Detail

### AbstractDocument.XPathExpr.Result

    public AbstractDocument.XPathExpr.Result(org.w3c.dom.Node n,
                                             short type)

  Creates a new single node Result object.

### AbstractDocument.XPathExpr.Result

    public AbstractDocument.XPathExpr.Result(boolean b)
                                      throws javax.xml.transform.TransformerException

  Creates a new boolean Result object.

  Throws:
    `javax.xml.transform.TransformerException`

### AbstractDocument.XPathExpr.Result

    public AbstractDocument.XPathExpr.Result(double d)
                                      throws javax.xml.transform.TransformerException

  Creates a new number Result object.

  Throws:
    `javax.xml.transform.TransformerException`

### AbstractDocument.XPathExpr.Result

    public AbstractDocument.XPathExpr.Result(java.lang.String s)

  Creates a new string Result object.

### AbstractDocument.XPathExpr.Result

    public AbstractDocument.XPathExpr.Result(org.w3c.dom.NodeList nl,
                                             short type)

  Creates a new node iterator Result object.

Method Detail

### getResultType

    public short getResultType()

  Gets the result type.

  Specified by:
    `getResultType` in interface `org.w3c.dom.xpath.XPathResult`

### getBooleanValue

    public boolean getBooleanValue()

  Gets the boolean value.

  Specified by:
    `getBooleanValue` in interface `org.w3c.dom.xpath.XPathResult`

### getNumberValue

    public double getNumberValue()

  Gets the number value.

  Specified by:
    `getNumberValue` in interface `org.w3c.dom.xpath.XPathResult`

### getStringValue

    public java.lang.String getStringValue()

  Gets the string value.

  Specified by:
    `getStringValue` in interface `org.w3c.dom.xpath.XPathResult`

### getSingleNodeValue

    public org.w3c.dom.Node getSingleNodeValue()

  Gets the single node value.

  Specified by:
    `getSingleNodeValue` in interface `org.w3c.dom.xpath.XPathResult`

### getInvalidIteratorState

    public boolean getInvalidIteratorState()

  Returns whether the iterator has been invalidated by document modifications.

  Specified by:
    `getInvalidIteratorState` in interface `org.w3c.dom.xpath.XPathResult`

### getSnapshotLength

    public int getSnapshotLength()

  Returns the length of the snapshot.

  Specified by:
    `getSnapshotLength` in interface `org.w3c.dom.xpath.XPathResult`

### iterateNext

    public org.w3c.dom.Node iterateNext()

  DOM: Implement `XPathResult.iterateNext()`.

  Specified by:
    `iterateNext` in interface `org.w3c.dom.xpath.XPathResult`

### snapshotItem

    public org.w3c.dom.Node snapshotItem(int i)

  Returns the `i`th item in the snapshot.

  Specified by:
    `snapshotItem` in interface `org.w3c.dom.xpath.XPathResult`

Copyright © 2008 Apache Software Foundation. All Rights Reserved.