I used this code:
String innerHtml = Jsoup.parse(htmlCode,"ISO-8859-1").select("body").html();
But it only removes the <html> tags
<html>
All HTML tags inside the body will be displayed.
HTML
body
Use .text() instead of .html() to get the combined text of the element and all its children.
.text()
.html()
Try using .text() :
Jsoup.parse(htmlCode,"ISO-8859-1").select("body").text();
Instead of .html() .
Source: https://habr.com/ru/post/1469557/More articles:Upload multiple images from a remote server using PHP (many images) - phprequest.path in django template - djangolubridate and ifelse - rTrying to add Spring Mobile to my current Spring MVC project - javaAssociating a Bootstrap Element with an Ajax Attribute - ajaxContinuous Deployment / Delivery and Security - securityhow to get last user status using tweepy - pythonCan I use multiple tricks of pseudo selectors with before / after the same element? - htmlHow to configure caching of headers on subdirectories in express - node.jsCreate a list in an Android application - androidAll Articles