Jsoup – Quick Start Example

Jsoup is a java library for parsing the html either from URL or String or File.


Jsoup dependency can be downloaded from here : http://jsoup.org/download

Quick Start Example

Note : method select(cssQuery) accepts CSS-like selector pattern for finding the elements.


Title : jsoup Java HTML Parser, with best of DOM, CSS, and jquery

href : /
text : jsoup

href : /news/
text : News

href : /bugs
text : Bugs

href : /discussion
text : Discussion

href : /download
text : Download

href : /apidocs/
text : API Reference

*** omitted the remaining output for readability ***


Author of CodeForEach.com . Loves coding and related technologies.