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 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 Details

    • resultType

      protected short resultType
      The result type.
    • numberValue

      protected double numberValue
      The number value.
    • stringValue

      protected String stringValue
      The string value.
    • booleanValue

      protected boolean booleanValue
      The boolean value.
    • singleNodeValue

      protected Node singleNodeValue
      The single node value.
    • iterator

      protected NodeList iterator
      The NodeList for iterators.
    • iteratorPosition

      protected int iteratorPosition
      The position of the iterator.
  • Constructor Details

    • Result

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

      public Result(boolean b) throws TransformerException
      Creates a new boolean Result object.
      Throws:
      TransformerException
    • Result

      public Result(double d) throws TransformerException
      Creates a new number Result object.
      Throws:
      TransformerException
    • 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 Details

    • 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 String getStringValue()
      Gets the string value.
      Specified by:
      getStringValue in interface org.w3c.dom.xpath.XPathResult
    • getSingleNodeValue

      public 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 Node iterateNext()
      DOM: Implement XPathResult.iterateNext().
      Specified by:
      iterateNext in interface org.w3c.dom.xpath.XPathResult
    • snapshotItem

      public Node snapshotItem(int i)
      Returns the ith item in the snapshot.
      Specified by:
      snapshotItem in interface org.w3c.dom.xpath.XPathResult