blob: 4aa6cebaac76ae84cf90ef3fa3148ec22490035a [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Nov 22 17:12:58 EST 2007 -->
<TITLE>
Xalan-Java 2.7.1: Class XPathAPI
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XPathAPI.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/apache/xpath/XPath.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/xpath/XPathContext.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="XPathAPI.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.xpath</FONT>
<BR>
Class XPathAPI</H2>
<PRE>
java.lang.Object
|
+--<B>org.apache.xpath.XPathAPI</B>
</PRE>
<HR>
<DL>
<DT>public class <B>XPathAPI</B><DT>extends java.lang.Object</DL>
<P>
The methods in this class are convenience methods into the
low-level XPath API.
These functions tend to be a little slow, since a number of objects must be
created for each evaluation. A faster way is to precompile the
XPaths using the low-level API, and then just use the XPaths
over and over.
NOTE: In particular, each call to this method will create a new
XPathContext, a new DTMManager... and thus a new DTM. That's very
safe, since it guarantees that you're always processing against a
fully up-to-date view of your document. But it's also portentially
very expensive, since you're rebuilding the DTM every time. You should
consider using an instance of CachedXPathAPI rather than these static
methods.
<P>
<DL>
<DT><B>See Also: </B><DD><a href="http://www.w3.org/TR/xpath">XPath Specification</a></DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#XPathAPI()">XPathAPI</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<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>static&nbsp;<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#eval(org.w3c.dom.Node, java.lang.String)">eval</A></B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Evaluate XPath string to an XObject.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#eval(org.w3c.dom.Node, java.lang.String, org.w3c.dom.Node)">eval</A></B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str,
<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;namespaceNode)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Evaluate XPath string to an XObject.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#eval(org.w3c.dom.Node, java.lang.String, org.apache.xml.utils.PrefixResolver)">eval</A></B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str,
<A HREF="../../../org/apache/xml/utils/PrefixResolver.html">PrefixResolver</A>&nbsp;prefixResolver)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Evaluate XPath string to an XObject.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../org/w3c/dom/traversal/NodeIterator.html">NodeIterator</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#selectNodeIterator(org.w3c.dom.Node, java.lang.String)">selectNodeIterator</A></B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use an XPath string to select a nodelist.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../org/w3c/dom/traversal/NodeIterator.html">NodeIterator</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#selectNodeIterator(org.w3c.dom.Node, java.lang.String, org.w3c.dom.Node)">selectNodeIterator</A></B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str,
<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;namespaceNode)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use an XPath string to select a nodelist.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../org/w3c/dom/NodeList.html">NodeList</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#selectNodeList(org.w3c.dom.Node, java.lang.String)">selectNodeList</A></B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use an XPath string to select a nodelist.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../org/w3c/dom/NodeList.html">NodeList</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#selectNodeList(org.w3c.dom.Node, java.lang.String, org.w3c.dom.Node)">selectNodeList</A></B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str,
<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;namespaceNode)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use an XPath string to select a nodelist.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../org/w3c/dom/Node.html">Node</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#selectSingleNode(org.w3c.dom.Node, java.lang.String)">selectSingleNode</A></B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use an XPath string to select a single node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../org/w3c/dom/Node.html">Node</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#selectSingleNode(org.w3c.dom.Node, java.lang.String, org.w3c.dom.Node)">selectSingleNode</A></B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str,
<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;namespaceNode)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use an XPath string to select a single node.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="XPathAPI()"><!-- --></A><H3>
XPathAPI</H3>
<PRE>
public <B>XPathAPI</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="selectSingleNode(org.w3c.dom.Node, java.lang.String)"><!-- --></A><H3>
selectSingleNode</H3>
<PRE>
public static <A HREF="../../../org/w3c/dom/Node.html">Node</A> <B>selectSingleNode</B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Use an XPath string to select a single node. XPath namespace
prefixes are resolved from the context node, which may not
be what you want (see the next method).<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contextNode</CODE> - The node to start searching from.<DD><CODE>str</CODE> - A valid XPath string.<DT><B>Returns:</B><DD>The first node found that matches the XPath, or null.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="selectSingleNode(org.w3c.dom.Node, java.lang.String, org.w3c.dom.Node)"><!-- --></A><H3>
selectSingleNode</H3>
<PRE>
public static <A HREF="../../../org/w3c/dom/Node.html">Node</A> <B>selectSingleNode</B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str,
<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;namespaceNode)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Use an XPath string to select a single node.
XPath namespace prefixes are resolved from the namespaceNode.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contextNode</CODE> - The node to start searching from.<DD><CODE>str</CODE> - A valid XPath string.<DD><CODE>namespaceNode</CODE> - The node from which prefixes in the XPath will be resolved to namespaces.<DT><B>Returns:</B><DD>The first node found that matches the XPath, or null.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="selectNodeIterator(org.w3c.dom.Node, java.lang.String)"><!-- --></A><H3>
selectNodeIterator</H3>
<PRE>
public static <A HREF="../../../org/w3c/dom/traversal/NodeIterator.html">NodeIterator</A> <B>selectNodeIterator</B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Use an XPath string to select a nodelist.
XPath namespace prefixes are resolved from the contextNode.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contextNode</CODE> - The node to start searching from.<DD><CODE>str</CODE> - A valid XPath string.<DT><B>Returns:</B><DD>A NodeIterator, should never be null.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="selectNodeIterator(org.w3c.dom.Node, java.lang.String, org.w3c.dom.Node)"><!-- --></A><H3>
selectNodeIterator</H3>
<PRE>
public static <A HREF="../../../org/w3c/dom/traversal/NodeIterator.html">NodeIterator</A> <B>selectNodeIterator</B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str,
<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;namespaceNode)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Use an XPath string to select a nodelist.
XPath namespace prefixes are resolved from the namespaceNode.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contextNode</CODE> - The node to start searching from.<DD><CODE>str</CODE> - A valid XPath string.<DD><CODE>namespaceNode</CODE> - The node from which prefixes in the XPath will be resolved to namespaces.<DT><B>Returns:</B><DD>A NodeIterator, should never be null.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="selectNodeList(org.w3c.dom.Node, java.lang.String)"><!-- --></A><H3>
selectNodeList</H3>
<PRE>
public static <A HREF="../../../org/w3c/dom/NodeList.html">NodeList</A> <B>selectNodeList</B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Use an XPath string to select a nodelist.
XPath namespace prefixes are resolved from the contextNode.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contextNode</CODE> - The node to start searching from.<DD><CODE>str</CODE> - A valid XPath string.<DT><B>Returns:</B><DD>A NodeIterator, should never be null.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="selectNodeList(org.w3c.dom.Node, java.lang.String, org.w3c.dom.Node)"><!-- --></A><H3>
selectNodeList</H3>
<PRE>
public static <A HREF="../../../org/w3c/dom/NodeList.html">NodeList</A> <B>selectNodeList</B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str,
<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;namespaceNode)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Use an XPath string to select a nodelist.
XPath namespace prefixes are resolved from the namespaceNode.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contextNode</CODE> - The node to start searching from.<DD><CODE>str</CODE> - A valid XPath string.<DD><CODE>namespaceNode</CODE> - The node from which prefixes in the XPath will be resolved to namespaces.<DT><B>Returns:</B><DD>A NodeIterator, should never be null.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="eval(org.w3c.dom.Node, java.lang.String)"><!-- --></A><H3>
eval</H3>
<PRE>
public static <A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>eval</B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Evaluate XPath string to an XObject. Using this method,
XPath namespace prefixes will be resolved from the namespaceNode.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contextNode</CODE> - The node to start searching from.<DD><CODE>str</CODE> - A valid XPath string.<DT><B>Returns:</B><DD>An XObject, which can be used to obtain a string, number, nodelist, etc, should never be null.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;<DT><B>See Also: </B><DD><A HREF="../../../org/apache/xpath/objects/XObject.html"><CODE>XObject</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XNull.html"><CODE>XNull</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XBoolean.html"><CODE>XBoolean</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XNumber.html"><CODE>XNumber</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XString.html"><CODE>XString</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XRTreeFrag.html"><CODE>XRTreeFrag</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="eval(org.w3c.dom.Node, java.lang.String, org.w3c.dom.Node)"><!-- --></A><H3>
eval</H3>
<PRE>
public static <A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>eval</B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str,
<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;namespaceNode)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Evaluate XPath string to an XObject.
XPath namespace prefixes are resolved from the namespaceNode.
The implementation of this is a little slow, since it creates
a number of objects each time it is called. This could be optimized
to keep the same objects around, but then thread-safety issues would arise.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contextNode</CODE> - The node to start searching from.<DD><CODE>str</CODE> - A valid XPath string.<DD><CODE>namespaceNode</CODE> - The node from which prefixes in the XPath will be resolved to namespaces.<DT><B>Returns:</B><DD>An XObject, which can be used to obtain a string, number, nodelist, etc, should never be null.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;<DT><B>See Also: </B><DD><A HREF="../../../org/apache/xpath/objects/XObject.html"><CODE>XObject</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XNull.html"><CODE>XNull</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XBoolean.html"><CODE>XBoolean</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XNumber.html"><CODE>XNumber</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XString.html"><CODE>XString</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XRTreeFrag.html"><CODE>XRTreeFrag</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="eval(org.w3c.dom.Node, java.lang.String, org.apache.xml.utils.PrefixResolver)"><!-- --></A><H3>
eval</H3>
<PRE>
public static <A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>eval</B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A>&nbsp;contextNode,
java.lang.String&nbsp;str,
<A HREF="../../../org/apache/xml/utils/PrefixResolver.html">PrefixResolver</A>&nbsp;prefixResolver)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Evaluate XPath string to an XObject.
XPath namespace prefixes are resolved from the namespaceNode.
The implementation of this is a little slow, since it creates
a number of objects each time it is called. This could be optimized
to keep the same objects around, but then thread-safety issues would arise.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contextNode</CODE> - The node to start searching from.<DD><CODE>str</CODE> - A valid XPath string.<DD><CODE>prefixResolver</CODE> - Will be called if the parser encounters namespace
prefixes, to resolve the prefixes to URLs.<DT><B>Returns:</B><DD>An XObject, which can be used to obtain a string, number, nodelist, etc, should never be null.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;<DT><B>See Also: </B><DD><A HREF="../../../org/apache/xpath/objects/XObject.html"><CODE>XObject</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XNull.html"><CODE>XNull</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XBoolean.html"><CODE>XBoolean</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XNumber.html"><CODE>XNumber</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XString.html"><CODE>XString</CODE></A>,
<A HREF="../../../org/apache/xpath/objects/XRTreeFrag.html"><CODE>XRTreeFrag</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XPathAPI.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/apache/xpath/XPath.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/xpath/XPathContext.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="XPathAPI.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright © 2006 Apache XML Project. All Rights Reserved.
</BODY>
</HTML>