<!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.5.0_18) on Sun Apr 01 21:18:39 PDT 2012 --> | |
<TITLE> | |
XPathAPI | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.xpath.XPathAPI class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="XPathAPI"; | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</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=2 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/XPathAPI.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/apache/xpath/XPath.html" title="class in org.apache.xpath"><B>PREV CLASS</B></A> | |
<A HREF="../../../org/apache/xpath/XPathContext.html" title="class in org.apache.xpath"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../index.html?org/apache/xpath/XPathAPI.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="XPathAPI.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 | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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.apache.xpath</FONT> | |
<BR> | |
Class XPathAPI</H2> | |
<PRE> | |
java.lang.Object | |
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.apache.xpath.XPathAPI</B> | |
</PRE> | |
<HR> | |
<DL> | |
<DT><PRE>public class <A HREF="../../../src-html/org/apache/xpath/XPathAPI.html#line.52"><B>XPathAPI</B></A><DT>extends java.lang.Object</DL> | |
</PRE> | |
<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> | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><a href="http://www.w3.org/TR/xpath">XPath Specification</a></DL> | |
<HR> | |
<P> | |
<!-- ======== CONSTRUCTOR SUMMARY ======== --> | |
<A NAME="constructor_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Constructor Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#XPathAPI()">XPathAPI</A></B>()</CODE> | |
<BR> | |
</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ========== METHOD SUMMARY =========== --> | |
<A NAME="method_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Method Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="../../../org/apache/xpath/objects/XObject.html" title="class in org.apache.xpath.objects">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>(org.w3c.dom.Node contextNode, | |
java.lang.String str)</CODE> | |
<BR> | |
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 <A HREF="../../../org/apache/xpath/objects/XObject.html" title="class in org.apache.xpath.objects">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>(org.w3c.dom.Node contextNode, | |
java.lang.String str, | |
org.w3c.dom.Node namespaceNode)</CODE> | |
<BR> | |
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 <A HREF="../../../org/apache/xpath/objects/XObject.html" title="class in org.apache.xpath.objects">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>(org.w3c.dom.Node contextNode, | |
java.lang.String str, | |
<A HREF="../../../org/apache/xml/utils/PrefixResolver.html" title="interface in org.apache.xml.utils">PrefixResolver</A> prefixResolver)</CODE> | |
<BR> | |
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 org.w3c.dom.traversal.NodeIterator</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#selectNodeIterator(org.w3c.dom.Node, java.lang.String)">selectNodeIterator</A></B>(org.w3c.dom.Node contextNode, | |
java.lang.String str)</CODE> | |
<BR> | |
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 org.w3c.dom.traversal.NodeIterator</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>(org.w3c.dom.Node contextNode, | |
java.lang.String str, | |
org.w3c.dom.Node namespaceNode)</CODE> | |
<BR> | |
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 org.w3c.dom.NodeList</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#selectNodeList(org.w3c.dom.Node, java.lang.String)">selectNodeList</A></B>(org.w3c.dom.Node contextNode, | |
java.lang.String str)</CODE> | |
<BR> | |
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 org.w3c.dom.NodeList</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>(org.w3c.dom.Node contextNode, | |
java.lang.String str, | |
org.w3c.dom.Node namespaceNode)</CODE> | |
<BR> | |
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 org.w3c.dom.Node</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPathAPI.html#selectSingleNode(org.w3c.dom.Node, java.lang.String)">selectSingleNode</A></B>(org.w3c.dom.Node contextNode, | |
java.lang.String str)</CODE> | |
<BR> | |
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 org.w3c.dom.Node</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>(org.w3c.dom.Node contextNode, | |
java.lang.String str, | |
org.w3c.dom.Node namespaceNode)</CODE> | |
<BR> | |
Use an XPath string to select a single node.</TD> | |
</TR> | |
</TABLE> | |
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<P> | |
<!-- ========= CONSTRUCTOR DETAIL ======== --> | |
<A NAME="constructor_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Constructor Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="XPathAPI()"><!-- --></A><H3> | |
XPathAPI</H3> | |
<PRE> | |
public <A HREF="../../../src-html/org/apache/xpath/XPathAPI.html#line.52"><B>XPathAPI</B></A>()</PRE> | |
<DL> | |
</DL> | |
<!-- ============ METHOD DETAIL ========== --> | |
<A NAME="method_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Method Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="selectSingleNode(org.w3c.dom.Node, java.lang.String)"><!-- --></A><H3> | |
selectSingleNode</H3> | |
<PRE> | |
public static org.w3c.dom.Node <A HREF="../../../src-html/org/apache/xpath/XPathAPI.html#line.66"><B>selectSingleNode</B></A>(org.w3c.dom.Node contextNode, | |
java.lang.String str) | |
throws javax.xml.transform.TransformerException</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). | |
<P> | |
<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><CODE>javax.xml.transform.TransformerException</CODE></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 org.w3c.dom.Node <A HREF="../../../src-html/org/apache/xpath/XPathAPI.html#line.83"><B>selectSingleNode</B></A>(org.w3c.dom.Node contextNode, | |
java.lang.String str, | |
org.w3c.dom.Node namespaceNode) | |
throws javax.xml.transform.TransformerException</PRE> | |
<DL> | |
<DD>Use an XPath string to select a single node. | |
XPath namespace prefixes are resolved from the namespaceNode. | |
<P> | |
<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><CODE>javax.xml.transform.TransformerException</CODE></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="selectNodeIterator(org.w3c.dom.Node, java.lang.String)"><!-- --></A><H3> | |
selectNodeIterator</H3> | |
<PRE> | |
public static org.w3c.dom.traversal.NodeIterator <A HREF="../../../src-html/org/apache/xpath/XPathAPI.html#line.105"><B>selectNodeIterator</B></A>(org.w3c.dom.Node contextNode, | |
java.lang.String str) | |
throws javax.xml.transform.TransformerException</PRE> | |
<DL> | |
<DD>Use an XPath string to select a nodelist. | |
XPath namespace prefixes are resolved from the contextNode. | |
<P> | |
<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><CODE>javax.xml.transform.TransformerException</CODE></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 org.w3c.dom.traversal.NodeIterator <A HREF="../../../src-html/org/apache/xpath/XPathAPI.html#line.122"><B>selectNodeIterator</B></A>(org.w3c.dom.Node contextNode, | |
java.lang.String str, | |
org.w3c.dom.Node namespaceNode) | |
throws javax.xml.transform.TransformerException</PRE> | |
<DL> | |
<DD>Use an XPath string to select a nodelist. | |
XPath namespace prefixes are resolved from the namespaceNode. | |
<P> | |
<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><CODE>javax.xml.transform.TransformerException</CODE></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="selectNodeList(org.w3c.dom.Node, java.lang.String)"><!-- --></A><H3> | |
selectNodeList</H3> | |
<PRE> | |
public static org.w3c.dom.NodeList <A HREF="../../../src-html/org/apache/xpath/XPathAPI.html#line.144"><B>selectNodeList</B></A>(org.w3c.dom.Node contextNode, | |
java.lang.String str) | |
throws javax.xml.transform.TransformerException</PRE> | |
<DL> | |
<DD>Use an XPath string to select a nodelist. | |
XPath namespace prefixes are resolved from the contextNode. | |
<P> | |
<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><CODE>javax.xml.transform.TransformerException</CODE></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 org.w3c.dom.NodeList <A HREF="../../../src-html/org/apache/xpath/XPathAPI.html#line.161"><B>selectNodeList</B></A>(org.w3c.dom.Node contextNode, | |
java.lang.String str, | |
org.w3c.dom.Node namespaceNode) | |
throws javax.xml.transform.TransformerException</PRE> | |
<DL> | |
<DD>Use an XPath string to select a nodelist. | |
XPath namespace prefixes are resolved from the namespaceNode. | |
<P> | |
<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><CODE>javax.xml.transform.TransformerException</CODE></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" title="class in org.apache.xpath.objects">XObject</A> <A HREF="../../../src-html/org/apache/xpath/XPathAPI.html#line.188"><B>eval</B></A>(org.w3c.dom.Node contextNode, | |
java.lang.String str) | |
throws javax.xml.transform.TransformerException</PRE> | |
<DL> | |
<DD>Evaluate XPath string to an XObject. Using this method, | |
XPath namespace prefixes will be resolved from the namespaceNode. | |
<P> | |
<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><CODE>javax.xml.transform.TransformerException</CODE><DT><B>See Also:</B><DD><A HREF="../../../org/apache/xpath/objects/XObject.html" title="class in org.apache.xpath.objects"><CODE>XObject</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XNull.html" title="class in org.apache.xpath.objects"><CODE>XNull</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XBoolean.html" title="class in org.apache.xpath.objects"><CODE>XBoolean</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XNumber.html" title="class in org.apache.xpath.objects"><CODE>XNumber</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XString.html" title="class in org.apache.xpath.objects"><CODE>XString</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XRTreeFrag.html" title="class in org.apache.xpath.objects"><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" title="class in org.apache.xpath.objects">XObject</A> <A HREF="../../../src-html/org/apache/xpath/XPathAPI.html#line.214"><B>eval</B></A>(org.w3c.dom.Node contextNode, | |
java.lang.String str, | |
org.w3c.dom.Node namespaceNode) | |
throws javax.xml.transform.TransformerException</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. | |
<P> | |
<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><CODE>javax.xml.transform.TransformerException</CODE><DT><B>See Also:</B><DD><A HREF="../../../org/apache/xpath/objects/XObject.html" title="class in org.apache.xpath.objects"><CODE>XObject</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XNull.html" title="class in org.apache.xpath.objects"><CODE>XNull</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XBoolean.html" title="class in org.apache.xpath.objects"><CODE>XBoolean</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XNumber.html" title="class in org.apache.xpath.objects"><CODE>XNumber</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XString.html" title="class in org.apache.xpath.objects"><CODE>XString</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XRTreeFrag.html" title="class in org.apache.xpath.objects"><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" title="class in org.apache.xpath.objects">XObject</A> <A HREF="../../../src-html/org/apache/xpath/XPathAPI.html#line.266"><B>eval</B></A>(org.w3c.dom.Node contextNode, | |
java.lang.String str, | |
<A HREF="../../../org/apache/xml/utils/PrefixResolver.html" title="interface in org.apache.xml.utils">PrefixResolver</A> prefixResolver) | |
throws javax.xml.transform.TransformerException</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. | |
<P> | |
<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><CODE>javax.xml.transform.TransformerException</CODE><DT><B>See Also:</B><DD><A HREF="../../../org/apache/xpath/objects/XObject.html" title="class in org.apache.xpath.objects"><CODE>XObject</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XNull.html" title="class in org.apache.xpath.objects"><CODE>XNull</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XBoolean.html" title="class in org.apache.xpath.objects"><CODE>XBoolean</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XNumber.html" title="class in org.apache.xpath.objects"><CODE>XNumber</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XString.html" title="class in org.apache.xpath.objects"><CODE>XString</CODE></A>, | |
<A HREF="../../../org/apache/xpath/objects/XRTreeFrag.html" title="class in org.apache.xpath.objects"><CODE>XRTreeFrag</CODE></A></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=2 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/XPathAPI.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/apache/xpath/XPath.html" title="class in org.apache.xpath"><B>PREV CLASS</B></A> | |
<A HREF="../../../org/apache/xpath/XPathContext.html" title="class in org.apache.xpath"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../index.html?org/apache/xpath/XPathAPI.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="XPathAPI.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 | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
</BODY> | |
</HTML> |