|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.lagarto.dom.DOMBuilderTagVisitor
public class DOMBuilderTagVisitor
Lagarto tag visitor that builds DOM tree.
| Field Summary | |
|---|---|
protected boolean |
caseSensitive
|
protected Node |
parentNode
|
protected boolean |
parsingHtml
|
protected Document |
rootNode
|
| Constructor Summary | |
|---|---|
DOMBuilderTagVisitor(LagartoDOMBuilder builder)
|
|
| Method Summary | |
|---|---|
void |
cdata(java.lang.CharSequence cdata)
Invoked on CDATA sequence. |
void |
comment(java.lang.CharSequence comment)
Invoked on comment. |
void |
condComment(java.lang.CharSequence conditionalComment,
boolean isStartingTag,
boolean isDownlevelHidden)
Invoked on IE conditional comments. |
void |
doctype(java.lang.String name,
java.lang.String publicId,
java.lang.String baseUri)
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. |
protected Node |
findMatchingParentOpenTag(java.lang.String tagName)
Finds matching parent open tag or null if not found. |
protected void |
fixUpToMatchingPoint(Node matchingParent)
|
Document |
getDocument()
Returns root document node of parsed DOM tree. |
void |
script(Tag tag,
java.lang.CharSequence body)
Invoked on script tag. |
void |
start()
Invoked on very beginning of the visiting. |
void |
style(Tag tag,
java.lang.CharSequence body)
Invoked on style tag. |
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(Tag tag)
Invoked on xml declaration. |
void |
xmp(Tag tag,
java.lang.CharSequence body)
Invoked on xmp tag. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final boolean caseSensitive
protected final boolean parsingHtml
protected Document rootNode
protected Node parentNode
| Constructor Detail |
|---|
public DOMBuilderTagVisitor(LagartoDOMBuilder builder)
| Method Detail |
|---|
public Document getDocument()
document node of parsed DOM tree.
public void start()
TagVisitor
start in interface TagVisitorpublic void end()
TagVisitor
end 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 TagVisitorprotected Node findMatchingParentOpenTag(java.lang.String tagName)
null if not found.
protected void fixUpToMatchingPoint(Node matchingParent)
public void xmp(Tag tag,
java.lang.CharSequence body)
TagVisitor
xmp in interface TagVisitor
public void style(Tag tag,
java.lang.CharSequence body)
TagVisitor
style in interface TagVisitor
public void script(Tag tag,
java.lang.CharSequence body)
TagVisitor
script in interface TagVisitorpublic void comment(java.lang.CharSequence comment)
TagVisitor
comment in interface TagVisitorpublic void text(java.lang.CharSequence text)
TagVisitor
text in interface TagVisitorpublic void cdata(java.lang.CharSequence cdata)
TagVisitor
cdata in interface TagVisitorpublic void xml(Tag tag)
TagVisitor
xml in interface TagVisitor
public void doctype(java.lang.String name,
java.lang.String publicId,
java.lang.String baseUri)
TagVisitornull, it is a SYSTEM
directive, otherwise it is PUBLIC.
doctype in interface TagVisitor
public void condComment(java.lang.CharSequence conditionalComment,
boolean isStartingTag,
boolean isDownlevelHidden)
TagVisitor
condComment in interface TagVisitorpublic void error(java.lang.String message)
TagVisitor
error in interface TagVisitormessage - parsing error message
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||