Sha256: 8493a01010571561147f6ca6218de6d89c3db8ec84efc0e60f8306d4bf97b294
Contents?: true
Size: 307 Bytes
Versions: 9
Compression:
Stored size: 307 Bytes
Contents
package wordcram.text; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; class Html2Text { public String text(String html, String cssSelector) { Document doc = Jsoup.parse(html); if (cssSelector == null) { return doc.text(); } else { return doc.select(cssSelector).text(); } } }
Version data entries
9 entries across 9 versions & 1 rubygems