Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Document.createExpression()

我們的志工尚未將此文章翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!

This method compiles an XPathExpression which can then be used for (repeated) evaluations.

Syntax

xpathExpr = document.createExpression(xpathText, namespaceURLMapper);

Parameters

  • String xpathText (the XPath expression to be compiled)
  • Function namespaceURLMapper (maps a namespace prefix to a namespace URL (or null if none needed))

Firefox 3 note

Prior to Firefox 3, you could call this method on documents other than the one you planned to run the XPath against. Under Firefox 3, you must call it on the same document.

Return value

XPathExpression

文件標籤與貢獻者

 此頁面的貢獻者: teoli, MHasan, kscarfone, Navin_Jadhav, Sheppy, ziyunfei, Brettz9, Nickolay
 最近更新: teoli,