You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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] )'
The text was updated successfully, but these errors were encountered:
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:
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] )'
The text was updated successfully, but these errors were encountered: