XQuilla/docs/dom3-api/classxercesc_1_1DOMXPathEvaluator.html

281 lines
20 KiB
HTML
Raw Normal View History

2020-02-17 21:05:20 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
2020-02-17 21:11:31 +00:00
<title>XQilla DOM3 API Documentation</title>
2020-02-17 21:05:20 +00:00
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
2020-02-17 21:11:31 +00:00
<a style="float:right;" href="http://sourceforge.net/projects/xqilla"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=152021&amp;type=2" border="0" alt="SourceForge.net Logo" /></a>
2020-02-17 21:10:06 +00:00
<!-- Generated by Doxygen 1.5.1 -->
2020-02-17 21:05:20 +00:00
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li id="current"><a href="classes.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul></div>
<div class="nav">
<a class="el" href="namespacexercesc.html">xercesc</a>::<a class="el" href="classxercesc_1_1DOMXPathEvaluator.html">DOMXPathEvaluator</a></div>
<h1>xercesc::DOMXPathEvaluator Class Reference</h1><!-- doxytag: class="xercesc::DOMXPathEvaluator" -->The evaluation of XPath expressions is provided by <code><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html">DOMXPathEvaluator</a></code>.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="DOMXPathEvaluator_8hpp-source.html">DOMXPathEvaluator.hpp</a>&gt;</code>
<p>
Inheritance diagram for xercesc::DOMXPathEvaluator:<p><center><img src="classxercesc_1_1DOMXPathEvaluator__inherit__graph.png" border="0" usemap="#xercesc_1_1DOMXPathEvaluator__inherit__map" alt="Inheritance graph"></center>
<map name="xercesc_1_1DOMXPathEvaluator__inherit__map">
2020-02-17 21:10:06 +00:00
<area href="classxercesc_1_1DOMDocument.html" shape="rect" coords="22,81,206,105" alt="">
2020-02-17 21:05:20 +00:00
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classxercesc_1_1DOMXPathEvaluator-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Functions introduced in DOM Level 3</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classxercesc_1_1DOMXPathExpression.html">DOMXPathExpression</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html#e389bf7c8aa48313cfb275a86df86708">createExpression</a> (const XMLCh *expression, const <a class="el" href="classxercesc_1_1DOMXPathNSResolver.html">DOMXPathNSResolver</a> *resolver)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a parsed XPath expression with resolved namespaces. <a href="#e389bf7c8aa48313cfb275a86df86708"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classxercesc_1_1DOMXPathNSResolver.html">DOMXPathNSResolver</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html#bbb342ea61f485cf714df7cac5039f0d">createNSResolver</a> (<a class="el" href="classxercesc_1_1DOMNode.html">DOMNode</a> *nodeResolver)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adapts any DOM node to resolve namespaces so that an XPath expression can be easily evaluated relative to the context of the node where it appeared within the document. <a href="#bbb342ea61f485cf714df7cac5039f0d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html#18c221115c600a8ae6b94b587a48a340">evaluate</a> (const XMLCh *expression, <a class="el" href="classxercesc_1_1DOMNode.html">DOMNode</a> *contextNode, const <a class="el" href="classxercesc_1_1DOMXPathNSResolver.html">DOMXPathNSResolver</a> *resolver, unsigned short type, void *result)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Evaluates an XPath expression string and returns a result of the specified type if possible. <a href="#18c221115c600a8ae6b94b587a48a340"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The evaluation of XPath expressions is provided by <code><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html">DOMXPathEvaluator</a></code>.
<p>
2020-02-17 21:10:06 +00:00
In a DOM implementation which supports the XPath 3.0 feature, the <code><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html">DOMXPathEvaluator</a></code> interface will be implemented on the same object which implements the Document interface permitting it to be obtained by casting or by using the DOM Level 3 getInterface method. In this case the implementation obtained from the Document supports the XPath DOM module and is compatible with the XPath 1.0 specification. Evaluation of expressions with specialized extension functions or variables may not work in all implementations and is, therefore, not portable. XPathEvaluator implementations may be available from other sources that could provide specific support for specialized extension functions or variables as would be defined by other specifications. <dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
2020-02-17 21:05:20 +00:00
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
2020-02-17 21:10:06 +00:00
<a class="anchor" name="a20e56e9ac22d2932b922a9f45fbe4fd"></a><!-- doxytag: member="xercesc::DOMXPathEvaluator::DOMXPathEvaluator" ref="a20e56e9ac22d2932b922a9f45fbe4fd" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
2020-02-17 21:05:20 +00:00
<tr>
2020-02-17 21:10:06 +00:00
<td class="memname">xercesc::DOMXPathEvaluator::DOMXPathEvaluator </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [inline, protected]</code></td>
2020-02-17 21:05:20 +00:00
</tr>
</table>
2020-02-17 21:10:06 +00:00
</div>
<div class="memdoc">
2020-02-17 21:05:20 +00:00
<p>
2020-02-17 21:10:06 +00:00
</div>
</div><p>
<a class="anchor" name="d0104c1560d904536000dac097ed80bc"></a><!-- doxytag: member="xercesc::DOMXPathEvaluator::~DOMXPathEvaluator" ref="d0104c1560d904536000dac097ed80bc" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
2020-02-17 21:05:20 +00:00
<tr>
2020-02-17 21:10:06 +00:00
<td class="memname">virtual xercesc::DOMXPathEvaluator::~DOMXPathEvaluator </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [inline, virtual]</code></td>
2020-02-17 21:05:20 +00:00
</tr>
</table>
2020-02-17 21:10:06 +00:00
</div>
<div class="memdoc">
2020-02-17 21:05:20 +00:00
<p>
Destructor.
<p>
2020-02-17 21:10:06 +00:00
</div>
</div><p>
<a class="anchor" name="a20e56e9ac22d2932b922a9f45fbe4fd"></a><!-- doxytag: member="xercesc::DOMXPathEvaluator::DOMXPathEvaluator" ref="a20e56e9ac22d2932b922a9f45fbe4fd" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">xercesc::DOMXPathEvaluator::DOMXPathEvaluator </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [inline, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="d0104c1560d904536000dac097ed80bc"></a><!-- doxytag: member="xercesc::DOMXPathEvaluator::~DOMXPathEvaluator" ref="d0104c1560d904536000dac097ed80bc" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual xercesc::DOMXPathEvaluator::~DOMXPathEvaluator </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Destructor.
<p>
</div>
</div><p>
2020-02-17 21:05:20 +00:00
<hr><h2>Member Function Documentation</h2>
2020-02-17 21:10:06 +00:00
<a class="anchor" name="e389bf7c8aa48313cfb275a86df86708"></a><!-- doxytag: member="xercesc::DOMXPathEvaluator::createExpression" ref="e389bf7c8aa48313cfb275a86df86708" args="(const XMLCh *expression, const DOMXPathNSResolver *resolver)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
2020-02-17 21:05:20 +00:00
<tr>
2020-02-17 21:10:06 +00:00
<td class="memname">virtual const <a class="el" href="classxercesc_1_1DOMXPathExpression.html">DOMXPathExpression</a>* xercesc::DOMXPathEvaluator::createExpression </td>
<td>(</td>
<td class="paramtype">const XMLCh *&nbsp;</td>
<td class="paramname"> <em>expression</em>, </td>
2020-02-17 21:05:20 +00:00
</tr>
<tr>
2020-02-17 21:10:06 +00:00
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classxercesc_1_1DOMXPathNSResolver.html">DOMXPathNSResolver</a> *&nbsp;</td>
<td class="paramname"> <em>resolver</em></td><td>&nbsp;</td>
2020-02-17 21:05:20 +00:00
</tr>
<tr>
2020-02-17 21:10:06 +00:00
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
2020-02-17 21:05:20 +00:00
</tr>
</table>
2020-02-17 21:10:06 +00:00
</div>
<div class="memdoc">
2020-02-17 21:05:20 +00:00
<p>
Creates a parsed XPath expression with resolved namespaces.
<p>
This is useful when an expression will be reused in an application since it makes it possible to compile the expression string into a more efficient internal form and preresolve all namespace prefixes which occur within the expression. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>expression</em>&nbsp;</td><td>of type XMLCh - The XPath expression string to be parsed. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>resolver</em>&nbsp;</td><td>of type <code>XPathNSResolver</code> - The resolver permits translation of all prefixes, including the xml namespace prefix, within the XPath expression into appropriate namespace URIs. If this is specified as null, any namespace prefix within the expression will result in <code><a class="el" href="classxercesc_1_1DOMException.html">DOMException</a></code> being thrown with the code NAMESPACE_ERR. </td></tr>
</table>
</dl>
2020-02-17 21:10:06 +00:00
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>XPathExpression</code> The compiled form of the XPath expression. </dd></dl>
2020-02-17 21:05:20 +00:00
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>&lt;code&gt;XPathException&lt;/code&gt;</em>&nbsp;</td><td>INVALID_EXPRESSION_ERR: Raised if the expression is not legal according to the rules of the <code><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html">DOMXPathEvaluator</a></code>. </td></tr>
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxercesc_1_1DOMException.html">DOMException</a></em>&nbsp;</td><td>NAMESPACE_ERR: Raised if the expression contains namespace prefixes which cannot be resolved by the specified <code>XPathNSResolver</code>. </td></tr>
</table>
</dl>
2020-02-17 21:10:06 +00:00
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="bbb342ea61f485cf714df7cac5039f0d"></a><!-- doxytag: member="xercesc::DOMXPathEvaluator::createNSResolver" ref="bbb342ea61f485cf714df7cac5039f0d" args="(DOMNode *nodeResolver)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
2020-02-17 21:05:20 +00:00
<tr>
2020-02-17 21:10:06 +00:00
<td class="memname">virtual const <a class="el" href="classxercesc_1_1DOMXPathNSResolver.html">DOMXPathNSResolver</a>* xercesc::DOMXPathEvaluator::createNSResolver </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classxercesc_1_1DOMNode.html">DOMNode</a> *&nbsp;</td>
<td class="paramname"> <em>nodeResolver</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [pure virtual]</code></td>
2020-02-17 21:05:20 +00:00
</tr>
</table>
2020-02-17 21:10:06 +00:00
</div>
<div class="memdoc">
2020-02-17 21:05:20 +00:00
<p>
Adapts any DOM node to resolve namespaces so that an XPath expression can be easily evaluated relative to the context of the node where it appeared within the document.
<p>
This adapter works like the DOM Level 3 method lookupNamespaceURI on nodes in resolving the namespaceURI from a given prefix using the current information available in the node's hierarchy at the time lookupNamespaceURI is called. also correctly resolving the implicit xml prefix. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>nodeResolver</em>&nbsp;</td><td>of type <code><a class="el" href="classxercesc_1_1DOMNode.html">DOMNode</a></code> The node to be used as a context for namespace resolution. </td></tr>
</table>
</dl>
2020-02-17 21:10:06 +00:00
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>XPathNSResolver</code> <code>XPathNSResolver</code> which resolves namespaces with respect to the definitions in scope for a specified node. </dd></dl>
</div>
</div><p>
<a class="anchor" name="18c221115c600a8ae6b94b587a48a340"></a><!-- doxytag: member="xercesc::DOMXPathEvaluator::evaluate" ref="18c221115c600a8ae6b94b587a48a340" args="(const XMLCh *expression, DOMNode *contextNode, const DOMXPathNSResolver *resolver, unsigned short type, void *result)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
2020-02-17 21:05:20 +00:00
<tr>
2020-02-17 21:10:06 +00:00
<td class="memname">virtual void* xercesc::DOMXPathEvaluator::evaluate </td>
<td>(</td>
<td class="paramtype">const XMLCh *&nbsp;</td>
<td class="paramname"> <em>expression</em>, </td>
2020-02-17 21:05:20 +00:00
</tr>
<tr>
2020-02-17 21:10:06 +00:00
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classxercesc_1_1DOMNode.html">DOMNode</a> *&nbsp;</td>
<td class="paramname"> <em>contextNode</em>, </td>
2020-02-17 21:05:20 +00:00
</tr>
<tr>
2020-02-17 21:10:06 +00:00
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classxercesc_1_1DOMXPathNSResolver.html">DOMXPathNSResolver</a> *&nbsp;</td>
<td class="paramname"> <em>resolver</em>, </td>
2020-02-17 21:05:20 +00:00
</tr>
<tr>
2020-02-17 21:10:06 +00:00
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned short&nbsp;</td>
<td class="paramname"> <em>type</em>, </td>
2020-02-17 21:05:20 +00:00
</tr>
<tr>
2020-02-17 21:10:06 +00:00
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&nbsp;</td>
<td class="paramname"> <em>result</em></td><td>&nbsp;</td>
2020-02-17 21:05:20 +00:00
</tr>
<tr>
2020-02-17 21:10:06 +00:00
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
2020-02-17 21:05:20 +00:00
</tr>
</table>
2020-02-17 21:10:06 +00:00
</div>
<div class="memdoc">
2020-02-17 21:05:20 +00:00
<p>
Evaluates an XPath expression string and returns a result of the specified type if possible.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>expression</em>&nbsp;</td><td>of type XMLCh The XPath expression string to be parsed and evaluated. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>contextNode</em>&nbsp;</td><td>of type <code><a class="el" href="classxercesc_1_1DOMNode.html">DOMNode</a></code> The context is context node for the evaluation of this XPath expression. If the <code><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html">DOMXPathEvaluator</a></code> was obtained by casting the <code><a class="el" href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code> then this must be owned by the same document and must be a <code><a class="el" href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code>, <code><a class="el" href="classxercesc_1_1DOMElement.html">DOMElement</a></code>, <code>DOMAttribute</code>, <code><a class="el" href="classxercesc_1_1DOMText.html">DOMText</a></code>, <code><a class="el" href="classxercesc_1_1DOMCDATASection.html">DOMCDATASection</a></code>, <code><a class="el" href="classxercesc_1_1DOMComment.html">DOMComment</a></code>, <code><a class="el" href="classxercesc_1_1DOMProcessingInstruction.html">DOMProcessingInstruction</a></code>, or <code>XPathNamespace</code> node. If the context node is a <code><a class="el" href="classxercesc_1_1DOMText.html">DOMText</a></code> or a <code><a class="el" href="classxercesc_1_1DOMCDATASection.html">DOMCDATASection</a></code>, then the context is interpreted as the whole logical text node as seen by XPath, unless the node is empty in which case it may not serve as the XPath context. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>resolver</em>&nbsp;</td><td>of type <code>XPathNSResolver</code> The resolver permits translation of all prefixes, including the xml namespace prefix, within the XPath expression into appropriate namespace URIs. If this is specified as null, any namespace prefix within the expression will result in <code><a class="el" href="classxercesc_1_1DOMException.html">DOMException</a></code> being thrown with the code NAMESPACE_ERR. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>of type unsigned short - If a specific type is specified, then the result will be returned as the corresponding type. For XPath 1.0 results, this must be one of the codes of the <code>XPathResult</code> interface. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>of type void* - The result specifies a specific result object which may be reused and returned by this method. If this is specified as null or the implementation does not reuse the specified result, a new result object will be constructed and returned. For XPath 1.0 results, this object will be of type <code>XPathResult</code>. </td></tr>
</table>
</dl>
2020-02-17 21:10:06 +00:00
<dl class="return" compact><dt><b>Returns:</b></dt><dd>void* The result of the evaluation of the XPath expression. For XPath 1.0 results, this object will be of type <code>XPathResult</code>. </dd></dl>
2020-02-17 21:05:20 +00:00
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>&lt;code&gt;XPathException&lt;/code&gt;</em>&nbsp;</td><td>INVALID_EXPRESSION_ERR: Raised if the expression is not legal according to the rules of the <code><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html">DOMXPathEvaluator</a></code> TYPE_ERR: Raised if the result cannot be converted to return the specified type. </td></tr>
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxercesc_1_1DOMException.html">DOMException</a></em>&nbsp;</td><td>NAMESPACE_ERR: Raised if the expression contains namespace prefixes which cannot be resolved by the specified <code>XPathNSResolver</code>. WRONG_DOCUMENT_ERR: The Node is from a document that is not supported by this <code><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html">DOMXPathEvaluator</a></code>. NOT_SUPPORTED_ERR: The Node is not a type permitted as an XPath context node or the request type is not permitted by this <code><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html">DOMXPathEvaluator</a></code>. </td></tr>
</table>
</dl>
2020-02-17 21:10:06 +00:00
</div>
</div><p>
2020-02-17 21:05:20 +00:00
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="DOMXPathEvaluator_8hpp-source.html">DOMXPathEvaluator.hpp</a></ul>
2020-02-17 21:13:50 +00:00
<hr size="1"><address style="align: right;"><small>Generated on Tue Apr 8 14:29:47 2008 for XQilla DOM Level 3 API by&nbsp;
2020-02-17 21:05:20 +00:00
<a href="http://www.doxygen.org/index.html">
2020-02-17 21:10:06 +00:00
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
2020-02-17 21:05:20 +00:00
</body>
</html>