Example usage for org.jsoup.nodes Document getElementsByAttributeStarting

List of usage examples for org.jsoup.nodes Document getElementsByAttributeStarting

Introduction

In this page you can find the example usage for org.jsoup.nodes Document getElementsByAttributeStarting.

Prototype

public Elements getElementsByAttributeStarting(String keyPrefix) 

Source Link

Document

Find elements that have an attribute name starting with the supplied prefix.

Usage

From source file:io.knotx.knot.action.domain.FormEntity.java

private static Map<String, String> getSignalToUrlMapping(Document scriptDocument) {
    return scriptDocument.getElementsByAttributeStarting(FORM_SIGNAL_ATTR_PREFIX).stream()
            .flatMap(element -> element.attributes().asList().stream())
            .filter(allAttr -> allAttr.getKey().startsWith(FORM_SIGNAL_ATTR_PREFIX)).collect(Collectors.toMap(
                    e -> e.getKey().replace(FORM_SIGNAL_ATTR_PREFIX, StringUtils.EMPTY), Entry::getValue));
}