Main Page | Class Hierarchy | Class List | Class Members

org::jdom::xpath::JaxenXPath Class Reference

Inheritance diagram for org::jdom::xpath::JaxenXPath:

org::jdom::xpath::XPath List of all members.

Public Member Functions

 JaxenXPath (String expr) throws JDOMException
List selectNodes (Object context) throws JDOMException
Object selectSingleNode (Object context) throws JDOMException
String valueOf (Object context) throws JDOMException
Number numberValueOf (Object context) throws JDOMException
void setVariable (String name, Object value) throws IllegalArgumentException
void addNamespace (Namespace namespace)
String getXPath ()
String toString ()
boolean equals (Object o)
int hashCode ()

Detailed Description

A non-public concrete XPath implementation for Jaxen.

Version:
Revision
1.19
,
Date
2004/09/03 07:27:39
Author:
Laurent Bihanic


Constructor & Destructor Documentation

org::jdom::xpath::JaxenXPath::JaxenXPath String  expr  )  throws JDOMException [inline]
 

Creates a new XPath wrapper object, compiling the specified XPath expression.

Parameters:
expr the XPath expression to wrap.
Exceptions:
JDOMException if the XPath expression is invalid.


Member Function Documentation

void org::jdom::xpath::JaxenXPath::addNamespace Namespace  namespace  )  [inline, virtual]
 

Adds a namespace definition to the list of namespaces known of this XPath expression.

Note: In XPath, there is no such thing as a 'default namespace'. The empty prefix always resolves to the empty namespace URI.

Parameters:
namespace the namespace.

Implements org::jdom::xpath::XPath.

String org::jdom::xpath::JaxenXPath::getXPath  )  [inline, virtual]
 

Returns the wrapped XPath expression as a string.

Returns:
the wrapped XPath expression as a string.

Implements org::jdom::xpath::XPath.

Number org::jdom::xpath::JaxenXPath::numberValueOf Object  context  )  throws JDOMException [inline, virtual]
 

Returns the number value of the first item selected by applying the wrapped XPath expression to the given context.

Parameters:
context the element to use as context for evaluating the XPath expression.
Returns:
the number value of the first item selected by applying the wrapped XPath expression to the given context, null if no node was selected or the special value java.lang.Double#NaN (Not-a-Number) if the selected value can not be converted into a number value.
Exceptions:
JDOMException if the XPath expression is invalid or its evaluation on the specified context failed.

Implements org::jdom::xpath::XPath.

List org::jdom::xpath::JaxenXPath::selectNodes Object  context  )  throws JDOMException [inline, virtual]
 

Evaluates the wrapped XPath expression and returns the list of selected items.

Parameters:
context the node to use as context for evaluating the XPath expression.
Returns:
the list of selected items, which may be of types: Element, Attribute, Text, CDATA, Comment, ProcessingInstruction, Boolean, Double, or String.
Exceptions:
JDOMException if the evaluation of the XPath expression on the specified context failed.

Implements org::jdom::xpath::XPath.

Object org::jdom::xpath::JaxenXPath::selectSingleNode Object  context  )  throws JDOMException [inline, virtual]
 

Evaluates the wrapped XPath expression and returns the first entry in the list of selected nodes (or atomics).

Parameters:
context the node to use as context for evaluating the XPath expression.
Returns:
the first selected item, which may be of types: Element, Attribute, Text, CDATA, Comment, ProcessingInstruction, Boolean, Double, String, or null if no item was selected.
Exceptions:
JDOMException if the evaluation of the XPath expression on the specified context failed.

Implements org::jdom::xpath::XPath.

void org::jdom::xpath::JaxenXPath::setVariable String  name,
Object  value
throws IllegalArgumentException [inline, virtual]
 

Defines an XPath variable and sets its value.

Parameters:
name the variable name.
value the variable value.
Exceptions:
IllegalArgumentException if name is not a valid XPath variable name or if the value type is not supported by the underlying implementation

Implements org::jdom::xpath::XPath.

String org::jdom::xpath::JaxenXPath::valueOf Object  context  )  throws JDOMException [inline, virtual]
 

Returns the string value of the first node selected by applying the wrapped XPath expression to the given context.

Parameters:
context the element to use as context for evaluating the XPath expression.
Returns:
the string value of the first node selected by applying the wrapped XPath expression to the given context.
Exceptions:
JDOMException if the XPath expression is invalid or its evaluation on the specified context failed.

Implements org::jdom::xpath::XPath.


The documentation for this class was generated from the following file:
Generated on Thu Dec 9 10:42:05 2004 for JDOM by  doxygen 1.3.9.1