I want to get text from html file in java
My html
file is:
<body>
<p>vishal</p>
<strong>patel</strong>
<bold >vishal patel
I want to output like this
vishal
patel
vishal patel
How to do this please help me
I have used a library called JSoup.
It's very simple to retrieve the text-only part from a HTML file.
It's very simple:
Jsoup.parse(html).text();
gives you the text from the HTML file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With