public class TagWriter extends java.lang.Object implements TagVisitor
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Appendable |
appendable |
| Constructor and Description |
|---|
TagWriter(java.lang.Appendable appendable) |
| Modifier and Type | Method and Description |
|---|---|
void |
cdata(java.lang.CharSequence cdata)
Invoked on CDATA sequence.
|
void |
comment(java.lang.CharSequence comment)
Invoked on comment.
|
void |
condComment(java.lang.CharSequence expression,
boolean isStartingTag,
boolean isHidden,
boolean isHiddenEndTag)
Invoked on IE conditional comment.
|
void |
doctype(Doctype doctype)
Invoked on DOCTYPE directive.
|
void |
end()
Invoked at the end, after all content is visited.
|
void |
error(java.lang.String message)
Warn about parsing error.
|
java.lang.Appendable |
getOutput() |
void |
script(Tag tag,
java.lang.CharSequence body)
Invoked on script tag.
|
void |
setOutput(java.lang.Appendable out) |
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)
Invoked on text i.e. anything other than a tag.
|
void |
xml(java.lang.CharSequence version,
java.lang.CharSequence encoding,
java.lang.CharSequence standalone)
Invoked on xml declaration.
|
public void setOutput(java.lang.Appendable out)
public java.lang.Appendable getOutput()
public void start()
TagVisitorstart in interface TagVisitorpublic void end()
TagVisitorend in interface TagVisitorpublic 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 TagVisitorpublic void script(Tag tag, java.lang.CharSequence body)
TagVisitorscript in interface TagVisitorpublic void comment(java.lang.CharSequence comment)
TagVisitorcomment in interface TagVisitorpublic void text(java.lang.CharSequence text)
TagVisitortext in interface TagVisitorpublic void cdata(java.lang.CharSequence cdata)
TagVisitorcdata in interface TagVisitorpublic void xml(java.lang.CharSequence version,
java.lang.CharSequence encoding,
java.lang.CharSequence standalone)
TagVisitorxml in interface TagVisitorpublic void doctype(Doctype doctype)
TagVisitordoctype in interface TagVisitorpublic void condComment(java.lang.CharSequence expression,
boolean isStartingTag,
boolean isHidden,
boolean isHiddenEndTag)
TagVisitor
The following conditional comments are recognized:
<!--[if IE 6]>one<![endif]-->
<!--[if IE 6]><!-->two<!---<![endif]-->
<!--[if IE 6]>three<!--xx<![endif]-->
<![if IE 6]>four<![endif]>
condComment in interface TagVisitorpublic void error(java.lang.String message)
TagVisitorerror in interface TagVisitormessage - parsing error messageCopyright © 2003-present Jodd Team