de.rw7.token
Interface HtmlConsumer

All Known Implementing Classes:
HtmlToc, LinkSpider.T, TokenTest, TokenTest.tag

public interface HtmlConsumer

A program using the HtmlTokenizer should implement this interface to get messages about the progress and results of the parser.


Method Summary
 int onClosingTag(int code, java.lang.String tag)
          Notifies the Consumer, that an closing html tag has been encountered.
 int onOpeningTag(int code, java.lang.String tag, java.lang.String[] attr)
          Notifies the Consumer, that an opening html tag has been encountered.
 void onText(FastInput in)
           
 

Method Detail

onOpeningTag

public int onOpeningTag(int code,
                        java.lang.String tag,
                        java.lang.String[] attr)
Notifies the Consumer, that an opening html tag has been encountered. This works only for registered tags.
Parameters:
code - the code provided on tag registration
tag - the tag name itself
attr - the tag attributes as registered
See Also:
HtmlTokenizer.addTag(java.lang.String, int, java.lang.String[])

onClosingTag

public int onClosingTag(int code,
                        java.lang.String tag)
Notifies the Consumer, that an closing html tag has been encountered.
Parameters:
code - the code provided on tag registration
tag - the tag name itself

onText

public void onText(FastInput in)
            throws java.io.IOException,
                   FastInput.EndException