Fix deprecation warning
Original class: https://github.com/jhy/jsoup/blob/9e36f9e/src/main/java/org/jsoup/examples/HtmlToPlainText.java
This commit is contained in:
parent
28c7858387
commit
fd0cac5957
@ -33,8 +33,8 @@ public class HtmlToPlainText {
|
|||||||
*/
|
*/
|
||||||
public String getPlainText(Element element) {
|
public String getPlainText(Element element) {
|
||||||
FormattingVisitor formatter = new FormattingVisitor();
|
FormattingVisitor formatter = new FormattingVisitor();
|
||||||
NodeTraversor traversor = new NodeTraversor(formatter);
|
// walk the DOM, and call .head() and .tail() for each node
|
||||||
traversor.traverse(element); // walk the DOM, and call .head() and .tail() for each node
|
NodeTraversor.traverse(formatter, element);
|
||||||
|
|
||||||
return formatter.toString();
|
return formatter.toString();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user