Package org.jsoup.select
Class QueryParser
java.lang.Object
org.jsoup.select.QueryParser
- All Implemented Interfaces:
AutoCloseable
public class QueryParser
extends Object
implements AutoCloseable
Parses a CSS selector into an Evaluator tree.
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Method Details
-
parse
Parse a CSS query into an Evaluator. If you are evaluating the same query repeatedly, it may be more efficient to parse it once and reuse the Evaluator.A query may contain at most 128 combinators, node selectors, and
:has(,) :is(, or) :not(expressions in total, across all selector alternatives.) - Parameters:
query- CSS query- Returns:
- Evaluator
- Throws:
Selector.SelectorParseException- if the CSS query is invalid or exceeds the complexity limit- See Also:
-
toString
public String toString()- Overrides:
toStringin classObject
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-