Example usage for org.jsoup.nodes Attributes asList

List of usage examples for org.jsoup.nodes Attributes asList

Introduction

In this page you can find the example usage for org.jsoup.nodes Attributes asList.

Prototype

public List<Attribute> asList() 

Source Link

Document

Get the attributes as a List, for iteration.

Usage

From source file:org.norvelle.addressdiscoverer.parse.unstructured.ForwardsFlattenedDocumentIterator.java

private String extractText(Element currElement) {
    StringBuilder sb = new StringBuilder();
    Attributes attrs = currElement.attributes();
    for (Attribute attr : attrs.asList()) {
        String attrValue = attr.getValue();
        sb.append(attr.getKey()).append(": ").append(attrValue).append("\n");
    }//from   w w  w.j av a 2  s  . c  o  m
    sb.append(currElement.ownText());
    return sb.toString();
}