public class TagAdapter extends java.lang.Object implements TagVisitor
Modifier and Type | Field and Description |
---|---|
protected TagVisitor |
target |
Constructor and Description |
---|
TagAdapter(TagVisitor target) |
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.
|
TagVisitor |
getTarget()
Returns target tag visitor.
|
void |
script(Tag tag,
java.lang.CharSequence body)
Invoked on script tag.
|
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.
|
protected final TagVisitor target
public TagAdapter(TagVisitor target)
public TagVisitor getTarget()
TagAdapter
or TagWriter
.public void start()
TagVisitor
start
in interface TagVisitor
public void end()
TagVisitor
end
in interface TagVisitor
public void tag(Tag tag)
TagVisitor
tag
(open, close or empty).
Warning: the passed tag instance should not be kept beyond this method as the parser reuse it!
tag
in interface TagVisitor
public void script(Tag tag, java.lang.CharSequence body)
TagVisitor
script
in interface TagVisitor
public void comment(java.lang.CharSequence comment)
TagVisitor
comment
in interface TagVisitor
public void text(java.lang.CharSequence text)
TagVisitor
text
in interface TagVisitor
public void cdata(java.lang.CharSequence cdata)
TagVisitor
cdata
in interface TagVisitor
public void xml(java.lang.CharSequence version, java.lang.CharSequence encoding, java.lang.CharSequence standalone)
TagVisitor
xml
in interface TagVisitor
public void doctype(Doctype doctype)
TagVisitor
doctype
in interface TagVisitor
public 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 TagVisitor
public void error(java.lang.String message)
TagVisitor
error
in interface TagVisitor
message
- parsing error messageCopyright © 2003-present Jodd Team