jodd.lagarto.adapter
Class StripHtmlTagAdapter
java.lang.Object
jodd.lagarto.TagAdapter
jodd.lagarto.adapter.StripHtmlTagAdapter
- All Implemented Interfaces:
- TagVisitor
public class StripHtmlTagAdapter
- extends TagAdapter
Strips all non-important characters from HTML.
Script and style blocks are not stripped, just HTML text blocks
and comments.
|
Method Summary |
void |
comment(java.lang.CharSequence comment)
Skips HTML comments. |
int |
getStrippedCharsCount()
Returns total number of stripped chars. |
void |
start()
Invoked on very beginning of the visiting. |
void |
text(java.lang.CharSequence text)
Cleans unnecessary whitespaces. |
| Methods inherited from class jodd.lagarto.TagAdapter |
cdata, condComment, doctype, end, error, getTarget, script, style, tag, xml, xmp |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
strippedCharsCount
protected int strippedCharsCount
StripHtmlTagAdapter
public StripHtmlTagAdapter(TagVisitor target)
start
public void start()
- Description copied from interface:
TagVisitor
- Invoked on very beginning of the visiting.
- Specified by:
start in interface TagVisitor- Overrides:
start in class TagAdapter
comment
public void comment(java.lang.CharSequence comment)
- Skips HTML comments.
- Specified by:
comment in interface TagVisitor- Overrides:
comment in class TagAdapter
text
public void text(java.lang.CharSequence text)
- Cleans unnecessary whitespaces.
- Specified by:
text in interface TagVisitor- Overrides:
text in class TagAdapter
getStrippedCharsCount
public int getStrippedCharsCount()
- Returns total number of stripped chars.
Copyright © 2003-2012 Jodd Team