| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private Object | currentContext
The current context for XPath expression evaluation. |
| private static final String | |
| private transient JDOMXPath | xPath
The compiled XPath object to select nodes. |
| Access | Constructor and Description |
|---|---|
| public | JaxenXPath(String
the XPath expression to wrap. expr)Creates a new XPath wrapper object, compiling the specified XPath expression. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addNamespace(Namespace
the namespace. namespace)Implements abstract org. |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public String | Returns: the wrapped XPath expression as a string.Implements abstract org. |
| public int | |
| public Number | 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.
(Not-a-Number) if the selected value can not be
converted into a number value.the element to use as context for evaluating
the XPath expression. context)Implements abstract org. |
| public List | selectNodes(Object
the node to use as context for evaluating
the XPath expression. context)Implements abstract org. |
| public Object | selectSingleNode(Object
the node to use as context for evaluating
the XPath expression. context)Implements abstract org. |
| public void | setVariable(String
the variable name. name, Object the variable value. value)Implements abstract org. |
| private void | |
| public String | |
| public String | Returns: the string value of the first node selected by applying the wrapped XPath expression to the given context.the element to use as context for evaluating
the XPath expression. context)Implements abstract org. |
| currentContext | back to summary |
|---|---|
| private Object currentContext The current context for XPath expression evaluation. | |
| CVS_ID | back to summary |
|---|---|
| private static final String CVS_ID Hides org. | |
| xPath | back to summary |
|---|---|
| private transient JDOMXPath xPath The compiled XPath object to select nodes. This attribute can not be made final as it needs to be set upon object deserialization. | |
| JaxenXPath | back to summary |
|---|---|
| public JaxenXPath(String expr) throws JDOMException Creates a new XPath wrapper object, compiling the specified XPath expression.
| |
| addNamespace | back to summary |
|---|---|
| public void addNamespace(Namespace namespace) Implements abstract org. 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.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getXPath | back to summary |
|---|---|
| public String getXPath() Implements abstract org. Returns the wrapped XPath expression as a string.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| numberValueOf | back to summary |
|---|---|
| public Number numberValueOf(Object context) throws JDOMException Implements abstract org. Returns the number value of the first item selected by applying the wrapped XPath expression to the given context.
| |
| selectNodes | back to summary |
|---|---|
| public List Implements abstract org. Evaluates the wrapped XPath expression and returns the list of selected items.
| |
| selectSingleNode | back to summary |
|---|---|
| public Object selectSingleNode(Object context) throws JDOMException Implements abstract org. Evaluates the wrapped XPath expression and returns the first entry in the list of selected nodes (or atomics).
| |
| setVariable | back to summary |
|---|---|
| public void setVariable(String name, Object value) throws IllegalArgumentException Implements abstract org. Defines an XPath variable and sets its value.
| |
| setXPath | back to summary |
|---|---|
| private void setXPath(String expr) throws JDOMException Compiles and sets the XPath expression wrapped by this object.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| valueOf | back to summary |
|---|---|
| public String valueOf(Object context) throws JDOMException Implements abstract org. Returns the string value of the first node selected by applying the wrapped XPath expression to the given context.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the namespace URI matching the prefix.the namespace prefix to resolve. prefix)Overrides org. Implements org. |
| NSContext | back to summary |
|---|---|
| public NSContext() | |
| translateNamespacePrefixToUri | back to summary |
|---|---|
| public String translateNamespacePrefixToUri(String prefix) Overrides org. Implements org. [Jaxen NamespaceContext interface support] Translates the provided namespace prefix into the matching bound namespace URI. | |