|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TokenHandler
Tokenizer reports tokens through this interface.
| Method Summary | |
|---|---|
void |
characters(char[] buf,
int start,
int length)
Receive character tokens. |
void |
comment(char[] buf,
int length)
Receive a comment token. |
void |
doctype(String name,
String publicIdentifier,
String systemIdentifier,
boolean correct)
Receive a doctype token. |
void |
endTag(String name,
Attributes attributes)
Receive an end tag token. |
void |
eof()
The end-of-file token. |
void |
start(Tokenizer self)
This method is called at the start of tokenization before any other methods on this interface are called. |
void |
startTag(String name,
Attributes attributes)
Receive a start tag token. |
boolean |
wantsComments()
If this handler implementation cares about comments, return true. |
| Method Detail |
|---|
void start(Tokenizer self)
throws SAXException
Tokenizer in order to set the
content model flag and in order to be able to query for
Locator data.
self - the Tokenizer.
SAXException - if something went wrong
boolean wantsComments()
throws SAXException
true.
If not, return false.
SAXException - if something went wrong
void doctype(String name,
String publicIdentifier,
String systemIdentifier,
boolean correct)
throws SAXException
name - the namepublicIdentifier - the public idsystemIdentifier - the system idcorrect - whether the token is correct
SAXException - if something went wrong
void startTag(String name,
Attributes attributes)
throws SAXException
name - the tag nameattributes - the attributes
SAXException - if something went wrong
void endTag(String name,
Attributes attributes)
throws SAXException
name - the tag nameattributes - the attributes
SAXException - if something went wrong
void comment(char[] buf,
int length)
throws SAXException
wantsComments()
returned false.
buf - a buffer holding the datalength - the number of code units to read
SAXException - if something went wrong
void characters(char[] buf,
int start,
int length)
throws SAXException
buf - a buffer holding the datastart - offset into the bufferlength - the number of code units to read
SAXException - if something went wrongContentHandler.characters(char[], int, int)
void eof()
throws SAXException
SAXException - if something went wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||