jodd.lagarto
Interface TagVisitor

All Known Implementing Classes:
DecoratorTagVisitor, DOMBuilderTagVisitor, EmptyTagVisitor, HtmlStaplerTagAdapter, PageRegionExtractor, StripHtmlTagAdapter, TagAdapter, TagAdapterWrapper, TagWriter

public interface TagVisitor

Handler that receives callbacks as content is parsed.


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.
 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.
 

Method Detail

start

void start()
Invoked on very beginning of the visiting.


end

void end()
Invoked at the end, after all content is visited.


tag

void tag(Tag tag)
Invoked on tag (open, close or empty).

Warning: the passed tag instance should not be kept beyond this method as the parser reuse it!


xmp

void xmp(Tag tag,
         java.lang.CharSequence body)
Invoked on xmp tag.


script

void script(Tag tag,
            java.lang.CharSequence body)
Invoked on script tag.


style

void style(Tag tag,
           java.lang.CharSequence body)
Invoked on style tag.


comment

void comment(java.lang.CharSequence comment)
Invoked on comment.


text

void text(java.lang.CharSequence text)
Invoked on text i.e. anything other than a tag.


cdata

void cdata(java.lang.CharSequence cdata)
Invoked on CDATA sequence.


xml

void xml(Tag tag)
Invoked on xml declaration.


doctype

void doctype(java.lang.String name,
             java.lang.String publicId,
             java.lang.String baseUri)
Invoked on DOCTYPE directive. If publicId is null, it is a SYSTEM directive, otherwise it is PUBLIC.


condComment

void condComment(java.lang.CharSequence conditionalComment,
                 boolean isStartingTag,
                 boolean isDownlevelHidden)
Invoked on IE conditional comments.


error

void error(java.lang.String message)
Warn about parsing error. Usually, parser will try to continue.

Parameters:
message - parsing error message


Copyright © 2003-2012 Jodd Team