I’m using Java and Jsoup to parse HTML pages and I want to get all the divs that not contains another divs inside it to print the text it contains.
But for example, if a div contains a table, and the table costains a div, I don’t want it. I want only the div at the most bottom level, with none another div inside it (another tags are ok).
How I do this?
Primarilly, I want to know if there is some syntax that can I use with the select() method.
1 Answer