.jar
, not a .sources
)
TemplatedProcessor
: private void verifySelector(String selector, Element element, TemplateSelector templateSelector,
org.jsoup.nodes.Element root) {
// make sure to use the same logic for finding matching elements as in TemplateUtils!
Elements elements = root.getElementsByAttributeValue("data-element", selector);
/**
* Find elements that have an attribute with the specific value. Case insensitive.
...
*/
public Elements getElementsByAttributeValue(String key, String value) {
//Elements elements = root.getElementsByAttributeValue("data-element", selector);
Elements elements = root.getElementsByAttribute("data-element");
long matchCount = elements.stream().filter(elem -> elem.attributes().getIgnoreCase("data-element").equals(selector)).count();