|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jsoup.examples.HtmlToPlainText
public class HtmlToPlainText
HTML to plain-text. This example program demonstrates the use of jsoup to convert HTML input to lightly-formatted plain-text. That is divergent from the general goal of jsoup's .text() methods, which is to get clean data from a scrape.
Note that this is a fairly simplistic formatter -- for real world use you'll want to embrace and extend.
Constructor Summary | |
---|---|
HtmlToPlainText()
|
Method Summary | |
---|---|
java.lang.String |
getPlainText(Element element)
Format an Element to plain-text |
static void |
main(java.lang.String... args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HtmlToPlainText()
Method Detail |
---|
public static void main(java.lang.String... args) throws java.io.IOException
java.io.IOException
public java.lang.String getPlainText(Element element)
element
- the root element to format
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |