mozilla

Revision 486567 of XPathExpression

  • Revision slug: XPathExpression
  • Revision title: XPathExpression
  • Revision id: 486567
  • Created:
  • Creator: Jeremie
  • Is current revision? Yes
  • Comment

Revision Content

An XPathExpression is a compiled XPath query returned from document.createExpression(). It has a method evaluate() which can be used to execute the compiled XPath.

Methods

  • evaluate (contextNode, type, result) - provide a context node/document, XPathResult constant, and XPathResult to store the query or null to return a new XPathResult.
  • evaluateWithContext (contextNode, contextPosition, contextSize, type, result) - provide a context node/document, context position, context size, XPathResult constant, and XPathResult to store the query or null to return a new XPathResult.

Revision Source

<p>An XPathExpression is a compiled XPath query returned from <a href="/en/DOM/document.createExpression" title="en/DOM/document.createExpression">document.createExpression()</a>. It has a method <code>evaluate()</code> which can be used to execute the compiled XPath.</p>
<h2 id="Methods" name="Methods">Methods</h2>
<ul>
 <li>evaluate (<code>contextNode</code>, <code>type</code>, <code>result</code>) - provide a context node/document, <code><a href="/en/XPathResult" title="en/XPathResult">XPathResult</a></code> constant, and <code>XPathResult</code> to store the query or null to return a new XPathResult.</li>
 <li>evaluateWithContext (<code>contextNode</code>, <code>contextPosition</code>, <code>contextSize</code>, <code>type</code>, <code>result</code>) - provide a context node/document, context position, context size, <code><a href="/en/XPathResult" title="en/XPathResult">XPathResult</a></code> constant, and <code>XPathResult</code> to store the query or null to return a new XPathResult.</li>
</ul>
Revert to this revision