I would like to select the text inside a strong tag, but without the div below it ...
Is there any way to do this with jsoup directly?
My attempt at selection (doesn't work, selects the full content inside a strong tag):
Elements selection = htmlDocument.select("strong").select("*:not(.dontwantthatclass)");
HTML:
<strong>
I want that text
<div class="dontwantthatclass">
</div>
</strong>
source
share