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:
Anderson Mesquita 2019-07-22 18:34:01 -04:00
parent 28c7858387
commit fd0cac5957
1 changed files with 2 additions and 2 deletions

View File

@ -33,8 +33,8 @@ public class HtmlToPlainText {
*/
public String getPlainText(Element element) {
FormattingVisitor formatter = new FormattingVisitor();
NodeTraversor traversor = new NodeTraversor(formatter);
traversor.traverse(element); // walk the DOM, and call .head() and .tail() for each node
// walk the DOM, and call .head() and .tail() for each node
NodeTraversor.traverse(formatter, element);
return formatter.toString();
}