Jsoup - BeautifulSoup for Java

HTML is notoriously difficult to parse and it has usually been a pain to do this in Java. Yes I know that there are parsers (like jtidy and nekohtml) that try to create a proper DOM but I’ve been waiting for something more lightweight. Enter Jsoup. It feels like a mix of JQuery and Beautiful Soup (for Python). String html = response.getContentAsString(); Document document = Jsoup.parse(html); Elements elements = document.select("#errorRef"); assertThat(elements....