| java.lang.Object | |
| ↳ | com.google.gdata.util.common.html.HtmlToText |
Convert provided html formatted string to text format.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | EMAIL_LINE_WIDTH_MAX | Maximum length of a line in email body (in characters) | |||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| htmlListPattern | Regular expression to match list tags and adjacent whitespace | ||||||||||
| htmlNewlinePattern | Regular expression to match html line breaks or paragraph tags and adjacent whitespace | ||||||||||
| htmlTagPattern | Regular expression to match any remaining html tags | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Convert provided html string to plain text preserving the formatting
as much as possible.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Maximum length of a line in email body (in characters)
Regular expression to match list tags and adjacent whitespace
Regular expression to match html line breaks or paragraph tags and adjacent whitespace
Regular expression to match any remaining html tags
Convert provided html string to plain text preserving the formatting as much as possible. Ensure line wrapping to 72 chars as default. NOTE: add support for more HTML tags here. For the present, convert <br> to '\n' convert <p> and </p> to '\n' convert <li> to "\n- "
| html |
|---|
| NullPointerException |
|---|