public class FormattingVisitor
extends java.lang.Object
implements org.jsoup.select.NodeVisitor
Note that this is a fairly simplistic formatter -- for real world use you'll want to embrace and extend.
To invoke from the command line, assuming you've downloaded the jsoup jar to your current directory:
java -cp jsoup.jar org.jsoup.examples.HtmlToPlainText url [selector]
| Constructor and Description |
|---|
FormattingVisitor() |
| Modifier and Type | Method and Description |
|---|---|
void |
head(org.jsoup.nodes.Node node,
int depth) |
void |
tail(org.jsoup.nodes.Node node,
int depth) |
java.lang.String |
toString() |
public void head(org.jsoup.nodes.Node node,
int depth)
head in interface org.jsoup.select.NodeVisitorpublic void tail(org.jsoup.nodes.Node node,
int depth)
tail in interface org.jsoup.select.NodeVisitorpublic java.lang.String toString()
toString in class java.lang.Object