How to take the text of the element, excluding text of nested elements?

There is the following HTML markup:
<a id="a">
ASD
the <small>BHA</small>
</a>

I need to get only "ASD", but when using jsoup I am doing a.text() returns "ASD BHA".
June 14th 19 at 19:07
1 answer
June 14th 19 at 19:09
Solution
Nobody reads the documentation :(
a.ownText()
Thank you very much! - dereck.Hagen commented on June 14th 19 at 19:12

Find more questions by tags HTMLJavaParsing