jsoup 1.6.1을 사용하고 html에서 iframe 태그를 제거하려고 할 때 문제가 발생합니다. iframe에 본문이 없으면 (즉, < iframe pro = value />), remove() 메소드는 thet 태그 다음의 모든 내용을 제거합니다. 여기 내 샘플 코드입니다.jsoup : iframe 태그 제거
This is start.
그러나 나는 결과를 기대하고있다 - -
String html ="<p> This is start.</p><iframe frameborder="0" marginheight="0" /><p> This is end</p>";
Document doc = Jsoup.parse(html,"UTF-8");<br>
doc.select("iframe").remove();<br>
System.out.println(doc.text());
그것은 나에게 돌려 사전