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) {
|
||||
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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue