Show XPath.html syntax highlighted
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_02) on Mon May 16 14:23:21 GMT+01:00 2005 -->
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>
XPath (dom4j 1.6.1 API)
</TITLE>
<META NAME="keywords" CONTENT="org.dom4j.XPath interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="XPath (dom4j 1.6.1 API)";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XPath.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../org/dom4j/Visitor.html" title="interface in org.dom4j"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="XPath.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.dom4j</FONT>
<BR>
Interface XPath</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD><A HREF="../../org/dom4j/NodeFilter.html" title="interface in org.dom4j">NodeFilter</A></DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../org/dom4j/xpath/DefaultXPath.html" title="class in org.dom4j.xpath">DefaultXPath</A></DD>
</DL>
<HR>
<DL>
<DT>public interface <B>XPath</B><DT>extends <A HREF="../../org/dom4j/NodeFilter.html" title="interface in org.dom4j">NodeFilter</A></DL>
<P>
<p>
<code>XPath</code> represents an XPath expression after it has been parsed
from a String.
</p>
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD><a href="mailto:james.strachan@metastuff.com">James Strachan </a></DD>
</DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#booleanValueOf(java.lang.Object)">booleanValueOf</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</CODE>
<BR>
Retrieve a boolean-value interpretation of this XPath expression when
evaluated against a given context.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#evaluate(java.lang.Object)">evaluate</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</CODE>
<BR>
<code>evaluate</code> evaluates an XPath expression and returns the
result as an <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang"><CODE>Object</CODE></A>. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> org.jaxen.FunctionContext</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#getFunctionContext()">getFunctionContext</A></B>()</CODE>
<BR>
DOCUMENT ME!</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> org.jaxen.NamespaceContext</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#getNamespaceContext()">getNamespaceContext</A></B>()</CODE>
<BR>
DOCUMENT ME!</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#getText()">getText</A></B>()</CODE>
<BR>
<code>getText</code> will return the textual version of the XPath
expression.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> org.jaxen.VariableContext</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#getVariableContext()">getVariableContext</A></B>()</CODE>
<BR>
DOCUMENT ME!</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#matches(org.dom4j.Node)">matches</A></B>(<A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j">Node</A> node)</CODE>
<BR>
<code>matches</code> returns true if the given node matches the XPath
expression. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Number.html" title="class or interface in java.lang">Number</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#numberValueOf(java.lang.Object)">numberValueOf</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</CODE>
<BR>
<code>numberValueOf</code> evaluates an XPath expression and returns
the numeric value of the XPath expression if the XPath expression results
is a number, or null if the result is not a number.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#selectNodes(java.lang.Object)">selectNodes</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</CODE>
<BR>
<code>selectNodes</code> performs this XPath expression on the given
<A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>or <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A>of <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>s instances appending all
the results together into a single list.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#selectNodes(java.lang.Object, org.dom4j.XPath)">selectNodes</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context,
<A HREF="../../org/dom4j/XPath.html" title="interface in org.dom4j">XPath</A> sortXPath)</CODE>
<BR>
<code>selectNodes</code> evaluates the XPath expression on the given
<A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>or <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A>of <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>s and returns the result as
a <code>List</code> of <code>Node</code> s sorted by the sort XPath
expression.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#selectNodes(java.lang.Object, org.dom4j.XPath, boolean)">selectNodes</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context,
<A HREF="../../org/dom4j/XPath.html" title="interface in org.dom4j">XPath</A> sortXPath,
boolean distinct)</CODE>
<BR>
<code>selectNodes</code> evaluates the XPath expression on the given
<A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>or <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A>of <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>s and returns the result as
a <code>List</code> of <code>Node</code> s sorted by the sort XPath
expression.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#selectObject(java.lang.Object)">selectObject</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</CODE>
<BR>
<B>Deprecated.</B> <I>please use evaluate(Object) instead. WILL BE REMOVED IN
dom4j-1.6 !!</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j">Node</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#selectSingleNode(java.lang.Object)">selectSingleNode</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</CODE>
<BR>
<code>selectSingleNode</code> evaluates this XPath expression on the
given <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>or <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A>of <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>s and returns the
result as a single <code>Node</code> instance.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#setFunctionContext(org.jaxen.FunctionContext)">setFunctionContext</A></B>(org.jaxen.FunctionContext functionContext)</CODE>
<BR>
Sets the function context to be used when evaluating XPath expressions</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#setNamespaceContext(org.jaxen.NamespaceContext)">setNamespaceContext</A></B>(org.jaxen.NamespaceContext namespaceContext)</CODE>
<BR>
Sets the namespace context to be used when evaluating XPath expressions</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#setNamespaceURIs(java.util.Map)">setNamespaceURIs</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> map)</CODE>
<BR>
Sets the current NamespaceContext from a Map where the keys are the
String namespace prefixes and the values are the namespace URIs.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#setVariableContext(org.jaxen.VariableContext)">setVariableContext</A></B>(org.jaxen.VariableContext variableContext)</CODE>
<BR>
Sets the variable context to be used when evaluating XPath expressions</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#sort(java.util.List)">sort</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A> list)</CODE>
<BR>
<code>sort</code> sorts the given List of Nodes using this XPath
expression as a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Comparator.html" title="class or interface in java.util"><CODE>Comparator</CODE></A>.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#sort(java.util.List, boolean)">sort</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A> list,
boolean distinct)</CODE>
<BR>
<code>sort</code> sorts the given List of Nodes using this XPath
expression as a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Comparator.html" title="class or interface in java.util"><CODE>Comparator</CODE></A>and optionally removing
duplicates.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/dom4j/XPath.html#valueOf(java.lang.Object)">valueOf</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</CODE>
<BR>
<code>valueOf</code> evaluates this XPath expression and returns the
textual representation of the results using the XPath string() function.
</TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getText()"><!-- --></A><H3>
getText</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getText</B>()</PRE>
<DL>
<DD><p>
<code>getText</code> will return the textual version of the XPath
expression.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the textual format of the XPath expression.</DL>
</DD>
</DL>
<HR>
<A NAME="matches(org.dom4j.Node)"><!-- --></A><H3>
matches</H3>
<PRE>
public boolean <B>matches</B>(<A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j">Node</A> node)</PRE>
<DL>
<DD><p>
<code>matches</code> returns true if the given node matches the XPath
expression. To be more precise when evaluating this XPath expression on
the given node the result set must include the node.
</p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../org/dom4j/NodeFilter.html#matches(org.dom4j.Node)">matches</A></CODE> in interface <CODE><A HREF="../../org/dom4j/NodeFilter.html" title="interface in org.dom4j">NodeFilter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>node</CODE> - DOCUMENT ME!
<DT><B>Returns:</B><DD>true if the given node matches this XPath expression</DL>
</DD>
</DL>
<HR>
<A NAME="evaluate(java.lang.Object)"><!-- --></A><H3>
evaluate</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>evaluate</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</PRE>
<DL>
<DD><p>
<code>evaluate</code> evaluates an XPath expression and returns the
result as an <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang"><CODE>Object</CODE></A>. The object returned can either be a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A> of <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>instances, a <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>instance, a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang"><CODE>String</CODE></A> or a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Number.html" title="class or interface in java.lang"><CODE>Number</CODE></A>instance depending on the XPath expression.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - is either a node or a list of nodes on which to evalute the
XPath
<DT><B>Returns:</B><DD>the value of the XPath expression as a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A>of <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A> instances, a <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>instance, a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang"><CODE>String</CODE></A>or a
<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Number.html" title="class or interface in java.lang"><CODE>Number</CODE></A>instance depending on the XPath expression.</DL>
</DD>
</DL>
<HR>
<A NAME="selectObject(java.lang.Object)"><!-- --></A><H3>
selectObject</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>selectObject</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</PRE>
<DL>
<DD><B>Deprecated.</B> <I>please use evaluate(Object) instead. WILL BE REMOVED IN
dom4j-1.6 !!</I>
<P>
<DD><p>
<code>selectObject</code> evaluates an XPath expression and returns the
result as an <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang"><CODE>Object</CODE></A>. The object returned can either be a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A> of <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>instances, a <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>instance, a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang"><CODE>String</CODE></A> or a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Number.html" title="class or interface in java.lang"><CODE>Number</CODE></A>instance depending on the XPath expression.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - is either a node or a list of nodes on which to evalute the
XPath
<DT><B>Returns:</B><DD>the value of the XPath expression as a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A>of <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A> instances, a <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>instance, a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang"><CODE>String</CODE></A>or a
<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Number.html" title="class or interface in java.lang"><CODE>Number</CODE></A>instance depending on the XPath expression.</DL>
</DD>
</DL>
<HR>
<A NAME="selectNodes(java.lang.Object)"><!-- --></A><H3>
selectNodes</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A> <B>selectNodes</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</PRE>
<DL>
<DD><p>
<code>selectNodes</code> performs this XPath expression on the given
<A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>or <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A>of <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>s instances appending all
the results together into a single list.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - is either a node or a list of nodes on which to evalute the
XPath
<DT><B>Returns:</B><DD>the results of all the XPath evaluations as a single list</DL>
</DD>
</DL>
<HR>
<A NAME="selectNodes(java.lang.Object, org.dom4j.XPath)"><!-- --></A><H3>
selectNodes</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A> <B>selectNodes</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context,
<A HREF="../../org/dom4j/XPath.html" title="interface in org.dom4j">XPath</A> sortXPath)</PRE>
<DL>
<DD><p>
<code>selectNodes</code> evaluates the XPath expression on the given
<A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>or <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A>of <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>s and returns the result as
a <code>List</code> of <code>Node</code> s sorted by the sort XPath
expression.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - is either a node or a list of nodes on which to evalute the
XPath<DD><CODE>sortXPath</CODE> - is the XPath expression to sort by
<DT><B>Returns:</B><DD>a list of <code>Node</code> instances</DL>
</DD>
</DL>
<HR>
<A NAME="selectNodes(java.lang.Object, org.dom4j.XPath, boolean)"><!-- --></A><H3>
selectNodes</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A> <B>selectNodes</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context,
<A HREF="../../org/dom4j/XPath.html" title="interface in org.dom4j">XPath</A> sortXPath,
boolean distinct)</PRE>
<DL>
<DD><p>
<code>selectNodes</code> evaluates the XPath expression on the given
<A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>or <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A>of <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>s and returns the result as
a <code>List</code> of <code>Node</code> s sorted by the sort XPath
expression.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - is either a node or a list of nodes on which to evalute the
XPath<DD><CODE>sortXPath</CODE> - is the XPath expression to sort by<DD><CODE>distinct</CODE> - specifies whether or not duplicate values of the sort
expression are allowed. If this parameter is true then only
distinct sort expressions values are included in the result
<DT><B>Returns:</B><DD>a list of <code>Node</code> instances</DL>
</DD>
</DL>
<HR>
<A NAME="selectSingleNode(java.lang.Object)"><!-- --></A><H3>
selectSingleNode</H3>
<PRE>
public <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j">Node</A> <B>selectSingleNode</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</PRE>
<DL>
<DD><p>
<code>selectSingleNode</code> evaluates this XPath expression on the
given <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>or <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A>of <A HREF="../../org/dom4j/Node.html" title="interface in org.dom4j"><CODE>Node</CODE></A>s and returns the
result as a single <code>Node</code> instance.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - is either a node or a list of nodes on which to evalute the
XPath
<DT><B>Returns:</B><DD>a single matching <code>Node</code> instance</DL>
</DD>
</DL>
<HR>
<A NAME="valueOf(java.lang.Object)"><!-- --></A><H3>
valueOf</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>valueOf</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</PRE>
<DL>
<DD><p>
<code>valueOf</code> evaluates this XPath expression and returns the
textual representation of the results using the XPath string() function.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - is either a node or a list of nodes on which to evalute the
XPath
<DT><B>Returns:</B><DD>the string representation of the results of the XPath expression</DL>
</DD>
</DL>
<HR>
<A NAME="numberValueOf(java.lang.Object)"><!-- --></A><H3>
numberValueOf</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Number.html" title="class or interface in java.lang">Number</A> <B>numberValueOf</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</PRE>
<DL>
<DD><p>
<code>numberValueOf</code> evaluates an XPath expression and returns
the numeric value of the XPath expression if the XPath expression results
is a number, or null if the result is not a number.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - is either a node or a list of nodes on which to evalute the
XPath
<DT><B>Returns:</B><DD>the numeric result of the XPath expression or null if the result
is not a number.</DL>
</DD>
</DL>
<HR>
<A NAME="booleanValueOf(java.lang.Object)"><!-- --></A><H3>
booleanValueOf</H3>
<PRE>
public boolean <B>booleanValueOf</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context)</PRE>
<DL>
<DD>Retrieve a boolean-value interpretation of this XPath expression when
evaluated against a given context.
<p>
The boolean-value of the expression is determined per the
<code>boolean(..)</code> core function as defined in the XPath
specification. This means that an expression that selects zero nodes will
return <code>false</code>, while an expression that selects
one-or-more nodes will return <code>true</code>.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - The node, nodeset or Context object for evaluation. This value
can be null
<DT><B>Returns:</B><DD>The boolean-value interpretation of this expression.<DT><B>Since:</B></DT>
<DD>1.5</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="sort(java.util.List)"><!-- --></A><H3>
sort</H3>
<PRE>
public void <B>sort</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A> list)</PRE>
<DL>
<DD><p>
<code>sort</code> sorts the given List of Nodes using this XPath
expression as a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Comparator.html" title="class or interface in java.util"><CODE>Comparator</CODE></A>.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>list</CODE> - is the list of Nodes to sort</DL>
</DD>
</DL>
<HR>
<A NAME="sort(java.util.List, boolean)"><!-- --></A><H3>
sort</H3>
<PRE>
public void <B>sort</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A> list,
boolean distinct)</PRE>
<DL>
<DD><p>
<code>sort</code> sorts the given List of Nodes using this XPath
expression as a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Comparator.html" title="class or interface in java.util"><CODE>Comparator</CODE></A>and optionally removing
duplicates.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>list</CODE> - is the list of Nodes to sort<DD><CODE>distinct</CODE> - if true then duplicate values (using the sortXPath for
comparisions) will be removed from the List</DL>
</DD>
</DL>
<HR>
<A NAME="getFunctionContext()"><!-- --></A><H3>
getFunctionContext</H3>
<PRE>
public org.jaxen.FunctionContext <B>getFunctionContext</B>()</PRE>
<DL>
<DD>DOCUMENT ME!
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the current function context</DL>
</DD>
</DL>
<HR>
<A NAME="setFunctionContext(org.jaxen.FunctionContext)"><!-- --></A><H3>
setFunctionContext</H3>
<PRE>
public void <B>setFunctionContext</B>(org.jaxen.FunctionContext functionContext)</PRE>
<DL>
<DD>Sets the function context to be used when evaluating XPath expressions
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>functionContext</CODE> - DOCUMENT ME!</DL>
</DD>
</DL>
<HR>
<A NAME="getNamespaceContext()"><!-- --></A><H3>
getNamespaceContext</H3>
<PRE>
public org.jaxen.NamespaceContext <B>getNamespaceContext</B>()</PRE>
<DL>
<DD>DOCUMENT ME!
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the current namespace context</DL>
</DD>
</DL>
<HR>
<A NAME="setNamespaceContext(org.jaxen.NamespaceContext)"><!-- --></A><H3>
setNamespaceContext</H3>
<PRE>
public void <B>setNamespaceContext</B>(org.jaxen.NamespaceContext namespaceContext)</PRE>
<DL>
<DD>Sets the namespace context to be used when evaluating XPath expressions
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>namespaceContext</CODE> - DOCUMENT ME!</DL>
</DD>
</DL>
<HR>
<A NAME="setNamespaceURIs(java.util.Map)"><!-- --></A><H3>
setNamespaceURIs</H3>
<PRE>
public void <B>setNamespaceURIs</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> map)</PRE>
<DL>
<DD><p>
Sets the current NamespaceContext from a Map where the keys are the
String namespace prefixes and the values are the namespace URIs.
</p>
<p>
For example:
<pre>
Map uris = new HashMap();
uris.put("SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/");
uris.put("m", "urn:xmethodsBabelFish");
XPath xpath = document
.createXPath("SOAP-ENV:Envelope/SOAP-ENV:Body/m:BabelFish");
xpath.setNamespaceURIs(uris);
Node babelfish = xpath.selectSingleNode(document);
</pre>
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>map</CODE> - the map containing the namespace mappings</DL>
</DD>
</DL>
<HR>
<A NAME="getVariableContext()"><!-- --></A><H3>
getVariableContext</H3>
<PRE>
public org.jaxen.VariableContext <B>getVariableContext</B>()</PRE>
<DL>
<DD>DOCUMENT ME!
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the current variable context</DL>
</DD>
</DL>
<HR>
<A NAME="setVariableContext(org.jaxen.VariableContext)"><!-- --></A><H3>
setVariableContext</H3>
<PRE>
public void <B>setVariableContext</B>(org.jaxen.VariableContext variableContext)</PRE>
<DL>
<DD>Sets the variable context to be used when evaluating XPath expressions
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>variableContext</CODE> - DOCUMENT ME!</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XPath.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../org/dom4j/Visitor.html" title="interface in org.dom4j"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="XPath.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2001-2005 MetaStuff Ltd.. All Rights Reserved.
</BODY>
</HTML>
See more files for this project here