Is there a way to select only innermost divs (i.e. divs that do not contain other divs) in Jsoup?
To clarify: I am referring to divs only. That is, if a div contains elements that aren’t divs but it doesn’t contain any div, it is considered (for my case) an “innermost div”.
Jsoup works with CSS selectors. But what you want is not possible with a CSS selector. So this is out of question. You’d need to examine every single div in a loop.