diff --git a/src/main/java/org/jsoup/nodes/Element.java b/src/main/java/org/jsoup/nodes/Element.java index fb295208ef..7c7c36cda3 100644 --- a/src/main/java/org/jsoup/nodes/Element.java +++ b/src/main/java/org/jsoup/nodes/Element.java @@ -509,19 +509,20 @@ public boolean is(Evaluator evaluator) { /** Beta: find Elements that match the supplied XPath expression. -

(This functionality is currently in beta and - is subject to change. Feedback on the API is requested and welcomed!)

+

(This functionality is currently in beta and is subject to change. Feedback on the API is requested and + welcomed!)

By default, XPath 1.0 expressions are supported. If you would to use XPath 2.0 or higher, you can provide an alternate XPathFactory implementation:

    -
  1. Add the implementation to your classpath. E.g. to use Saxon-HE, add net.sf.saxon:Saxon-HE to your build.
  2. +
  3. Add the implementation to your classpath. E.g. to use Saxon-HE, add net.sf.saxon:Saxon-HE to your build.
  4. Set the system property javax.xml.xpath.XPathFactory:jsoup to the implementing classname. E.g.:
    - System.setProperty(W3CDom.XPathFactoryProperty, "net.sf.saxon.xpath.XPathFactoryImpl"); + System.setProperty(W3CDom.XPathFactoryProperty, "net.sf.saxon.xpath.XPathFactoryImpl");
@param xpath XPath expression @return matching elements, or an empty list if none match. + @since 1.14.3. */ public Elements selectXpath(String xpath) { return new Elements(NodeUtils.selectXpath(xpath, this, Element.class));