Java Code Examples for org.jsoup.select.Selector.SelectorParseException
The following examples show how to use
org.jsoup.select.Selector.SelectorParseException. These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: vividus Source File: ResourceCheckSteps.java License: Apache License 2.0 | 5 votes |
private String getSelector(Element element) { try { return element.cssSelector(); } catch (SelectorParseException exception) { return "N/A"; } }
Example 2
Source Project: Asqatasun Source File: DOMHandlerImpl.java License: GNU Affero General Public License v3.0 | 5 votes |
/** * http://www.ibm.com/developerworks/library/x-javaxpathapi.html * * @param expr * @return */ @Override public DOMHandler cssLikeSelectNodeSet(String expr) { if (StringUtils.isNotBlank(expr)) { try { selectedElements = jsoupDocument.select(expr); } catch (SelectorParseException spe) { } catch (IllegalArgumentException iae) { } } return this; }