Hi, I am trying to get specific text from an HTML file using jsoup. I already know how to get text2 and text3. But how do I get the text I want without others?<div class="snt"> text I want
<br clear="both" />text2
<br clear="both" />text3
<br clear="both" />
</div>
I tried to use
Elements lines = doc.select(".snt");
lines.First().nextSibling().toString();
but I get nothing. I also tried:
Elements lines = doc.select(".snt");
lines.text(); // this return all texts together
Could you help me? Thank you for your responses.
source
share