MDN wants to learn about developers like you: https://qsurvey.mozilla.com/s3/MDN-dev-survey-2018-1

Aller à :

Our volunteers haven't translated this article into Français yet. Join us and help get the job done!
You can also read the article in English (US).

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

Étiquettes et contributeurs liés au document

 Contributeurs à cette page : teoli, MHasan, kscarfone, Navin_Jadhav, Sheppy, ziyunfei, Brettz9, Nickolay
 Dernière mise à jour par : teoli,