|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.lagarto.TagAdapter
jodd.lagarto.adapter.StripHtmlTagAdapter
public class StripHtmlTagAdapter
Strips all non-important characters from HTML. Script and style blocks are not stripped, just HTML text blocks and comments.
| Field Summary | |
|---|---|
protected boolean |
strip
|
protected int |
strippedCharsCount
|
| Fields inherited from class jodd.lagarto.TagAdapter |
|---|
target |
| Constructor Summary | |
|---|---|
StripHtmlTagAdapter(TagVisitor target)
|
|
| 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 |
tag(Tag tag)
Invoked on tag (open, close or empty). |
void |
text(java.lang.CharSequence text)
Cleans unnecessary whitespaces. |
| Methods inherited from class jodd.lagarto.TagAdapter |
|---|
cdata, condComment, doctype, end, error, getTarget, script, style, xml, xmp |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int strippedCharsCount
protected boolean strip
| Constructor Detail |
|---|
public StripHtmlTagAdapter(TagVisitor target)
| Method Detail |
|---|
public void start()
TagVisitor
start in interface TagVisitorstart in class TagAdapterpublic void comment(java.lang.CharSequence comment)
comment in interface TagVisitorcomment in class TagAdapterpublic void tag(Tag tag)
TagVisitortag (open, close or empty).
Warning: the passed tag instance should not be kept beyond this method as the parser reuse it!
tag in interface TagVisitortag in class TagAdapterpublic void text(java.lang.CharSequence text)
text in interface TagVisitortext in class TagAdapterpublic int getStrippedCharsCount()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||