jsoup is a Java library for working with real-world HTML. It provides a
very convenient API for extracting and manipulating data, using the best
of DOM, CSS, and jquery-like methods.
It implements the WHATWG HTML5 specification (http://whatwg.org/html),
and parses HTML to the same DOM as modern browsers do. It's designed to
deal with all varieties of HTML found in the wild; from pristine and
validating, to invalid tag-soup; jsoup will create a sensible parse tree.