public static interface TagTokenizer.TokenHandler
| Modifier and Type | Method and Description |
|---|---|
boolean |
shouldProcessTag(String name)
Before attempting to parse a tag, the tokenizer will ask the handler whether the tag should be processed -
avoiding additional tag parsing makes the tokenizer quicker.
|
void |
tag(Tag tag)
Called when tokenizer encounters an HTML tag (open, close or empty).
|
void |
text(CharSequence text)
Called when tokenizer encounters anything other than a well-formed HTML tag.
|
void |
warning(String message,
int line,
int column)
Called when tokenizer encounters something it cannot correctly parse.
|
boolean shouldProcessTag(String name)
tag(Tag) method.
Otherwise, the tokenizer will not try to parse the tag and pass it to the
text(CharSequence) method, untouched.void tag(Tag tag) throws IOException
IOExceptionvoid text(CharSequence text) throws IOException
IOExceptionvoid warning(String message, int line, int column)
message - Error messageline - Line number in input that error occuredcolumn - Column number in input that error occuredCopyright © 2015. All Rights Reserved.