-
Notifications
You must be signed in to change notification settings - Fork 150
Open
Description
My query is:
( //script | //*[@id] | //*[@class] | //*[@for] )
My query works on Selenium. But when I try to run the query to get a list of jsoup Elements by the following function:
public static void normaliseHtmlDom(Document htmlDom) throws ConfigInitializationException {
Elements elements = htmlDom.getAllElements();
Elements ignoredElements = Xsoup.compile(ConfigUtils.getInstance().getIgnoredXPathUnion()).evaluate(htmlDom).getElements();
for(Element element : elements) {
if(ignoredElements.contains(element)) {
elements.remove(element);
}
}
// normaliseElementsByTagNames(elements);
// normaliseElementsByAttributeNames(elements);
}
The following Exception is thrown:
org.jsoup.select.Selector$SelectorParseException: Could not parse query '( //script | //*[@id] | //*[@class] | //*[@for] )': unexpected token at '( //script | //*[@id] | //*[@class] | //*[@for] )'
Metadata
Metadata
Assignees
Labels
No labels