287 lines
20 KiB
HTML
287 lines
20 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>XQilla DOM Level 3 API: xercesc::DOMXPathEvaluator Class Reference</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.4.6 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main 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 List</span></a></li>
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class 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 <<a class="el" href="DOMXPathEvaluator_8hpp-source.html">DOMXPathEvaluator.hpp</a>></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">
|
|
<area href="classxercesc_1_1DOMDocument.html" shape="rect" coords="24,83,192,107" alt="">
|
|
</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">Destructor</div></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html#d0104c1560d904536000dac097ed80bc">~DOMXPathEvaluator</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#d0104c1560d904536000dac097ed80bc"></a><br></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> * </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"> </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> * </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"> </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 * </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"> </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>
|
|
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
|
|
<tr><td colspan="2"><div class="groupHeader">Hidden constructors</div></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classxercesc_1_1DOMXPathEvaluator.html#a20e56e9ac22d2932b922a9f45fbe4fd">DOMXPathEvaluator</a> ()</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>
|
|
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 compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
|
|
|
|
<p>
|
|
<hr><h2>Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" name="a20e56e9ac22d2932b922a9f45fbe4fd"></a><!-- doxytag: member="xercesc::DOMXPathEvaluator::DOMXPathEvaluator" ref="a20e56e9ac22d2932b922a9f45fbe4fd" args="()" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">xercesc::DOMXPathEvaluator::DOMXPathEvaluator </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="mdname1" valign="top" nowrap> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap><code> [inline, protected]</code></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="d0104c1560d904536000dac097ed80bc"></a><!-- doxytag: member="xercesc::DOMXPathEvaluator::~DOMXPathEvaluator" ref="d0104c1560d904536000dac097ed80bc" args="()" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">virtual xercesc::DOMXPathEvaluator::~DOMXPathEvaluator </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="mdname1" valign="top" nowrap> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap><code> [inline, virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Destructor.
|
|
<p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="e389bf7c8aa48313cfb275a86df86708"></a><!-- doxytag: member="xercesc::DOMXPathEvaluator::createExpression" ref="e389bf7c8aa48313cfb275a86df86708" args="(const XMLCh *expression, const DOMXPathNSResolver *resolver)=0" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">virtual const <a class="el" href="classxercesc_1_1DOMXPathExpression.html">DOMXPathExpression</a>* xercesc::DOMXPathEvaluator::createExpression </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">const XMLCh * </td>
|
|
<td class="mdname" nowrap> <em>expression</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>const <a class="el" href="classxercesc_1_1DOMXPathNSResolver.html">DOMXPathNSResolver</a> * </td>
|
|
<td class="mdname" nowrap> <em>resolver</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<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> </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> </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>
|
|
<dl compact><dt><b>Returns:</b></dt><dd><code>XPathExpression</code> The compiled form of the XPath expression. </dd></dl>
|
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em><code>XPathException</code></em> </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> </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>
|
|
<dl compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="bbb342ea61f485cf714df7cac5039f0d"></a><!-- doxytag: member="xercesc::DOMXPathEvaluator::createNSResolver" ref="bbb342ea61f485cf714df7cac5039f0d" args="(DOMNode *nodeResolver)=0" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">virtual const <a class="el" href="classxercesc_1_1DOMXPathNSResolver.html">DOMXPathNSResolver</a>* xercesc::DOMXPathEvaluator::createNSResolver </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="classxercesc_1_1DOMNode.html">DOMNode</a> * </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>nodeResolver</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<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> </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>
|
|
<dl 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>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<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" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">virtual void* xercesc::DOMXPathEvaluator::evaluate </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">const XMLCh * </td>
|
|
<td class="mdname" nowrap> <em>expression</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap><a class="el" href="classxercesc_1_1DOMNode.html">DOMNode</a> * </td>
|
|
<td class="mdname" nowrap> <em>contextNode</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>const <a class="el" href="classxercesc_1_1DOMXPathNSResolver.html">DOMXPathNSResolver</a> * </td>
|
|
<td class="mdname" nowrap> <em>resolver</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>unsigned short </td>
|
|
<td class="mdname" nowrap> <em>type</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>void * </td>
|
|
<td class="mdname" nowrap> <em>result</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<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> </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> </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> </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> </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> </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>
|
|
<dl 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>
|
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em><code>XPathException</code></em> </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> </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>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<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>
|
|
<hr size="1"><address style="align: right;"><small>Generated on Mon Feb 12 16:52:13 2007 for XQilla DOM Level 3 API by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
|
</body>
|
|
</html>
|