com.japisoft.xmlpad.toolkit
Class XPathHandler

java.lang.Object
  extended bycom.japisoft.xmlpad.toolkit.XPathHandler

public class XPathHandler
extends java.lang.Object

Handler for XPath expression like highlighting XPath expression nodes inside the XMLContainer or select the first one or the next one...

Version:
1.0
Author:
(c) 2004 JAPISoft / http://www.japisoft.com

Constructor Summary
XPathHandler(XMLContainer container, java.lang.String xpathExpression, boolean relative)
           
 
Method Summary
 java.lang.String getAttributeValue()
           
 java.lang.Object getRawResult()
           
 boolean hasResultNodes()
           
 boolean isAttributeType()
           
 boolean isResultNodesType()
           
 boolean selectNext()
          Select the next node
 boolean selectPrevious()
          Select the previous node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathHandler

public XPathHandler(XMLContainer container,
                    java.lang.String xpathExpression,
                    boolean relative)
             throws com.japisoft.xpath.XPathException
Method Detail

isResultNodesType

public boolean isResultNodesType()
Returns:
true if the result type is a nodeset

isAttributeType

public boolean isAttributeType()
Returns:
true if the result type is an attribute

getAttributeValue

public java.lang.String getAttributeValue()
Returns:
the attribute value for an attribute type result

getRawResult

public java.lang.Object getRawResult()
Returns:
the xpath result. This is useful only for a non nodeset type

hasResultNodes

public boolean hasResultNodes()
Returns:
true if the previous xpath expression has result node

selectNext

public boolean selectNext()
Select the next node


selectPrevious

public boolean selectPrevious()
Select the previous node



Copyright © 2006 JAPISoft. All Rights Reserved.