|
||||||||||
| 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 | |
|---|---|
boolean |
cdataSectionAllowed()
Checks if the CDATA sections are allowed. |
void |
characters(char[] buf,
int start,
int length)
Receive character tokens. |
void |
comment(char[] buf,
int start,
int length)
Receive a comment token. |
void |
doctype(java.lang.String name,
java.lang.String publicIdentifier,
java.lang.String systemIdentifier,
boolean forceQuirks)
Receive a doctype token. |
void |
endTag(ElementName eltName)
Receive an end tag token. |
void |
endTokenization()
The perform final cleanup. |
void |
eof()
The end-of-file token. |
void |
startTag(ElementName eltName,
HtmlAttributes attributes,
boolean selfClosing)
Receive a start tag token. |
void |
startTokenization(Tokenizer self)
This method is called at the start of tokenization before any other methods on this interface are called. |
boolean |
wantsComments()
If this handler implementation cares about comments, return true. |
void |
zeroOriginatingReplacementCharacter()
Reports a U+0000 that's being turned into a U+FFFD. |
| Method Detail |
|---|
void startTokenization(Tokenizer self)
throws org.xml.sax.SAXException
Tokenizer in order to set the content
model flag and in order to be able to query for Locator
data.
self - the Tokenizer.
org.xml.sax.SAXException - if something went wrong
boolean wantsComments()
throws org.xml.sax.SAXException
true. If not, return false.
org.xml.sax.SAXException - if something went wrong
void doctype(java.lang.String name,
java.lang.String publicIdentifier,
java.lang.String systemIdentifier,
boolean forceQuirks)
throws org.xml.sax.SAXException
name - the namepublicIdentifier - the public idsystemIdentifier - the system idforceQuirks - whether the token is correct
org.xml.sax.SAXException - if something went wrong
void startTag(ElementName eltName,
HtmlAttributes attributes,
boolean selfClosing)
throws org.xml.sax.SAXException
eltName - the tag nameattributes - the attributesselfClosing - TODO
org.xml.sax.SAXException - if something went wrong
void endTag(ElementName eltName)
throws org.xml.sax.SAXException
eltName - the tag name
org.xml.sax.SAXException - if something went wrong
void comment(char[] buf,
int start,
int length)
throws org.xml.sax.SAXException
wantsComments() returned false.
buf - a buffer holding the datastart - the offset into the bufferlength - the number of code units to read
org.xml.sax.SAXException - if something went wrong
void characters(char[] buf,
int start,
int length)
throws org.xml.sax.SAXException
buf - a buffer holding the datastart - offset into the bufferlength - the number of code units to read
org.xml.sax.SAXException - if something went wrongContentHandler.characters(char[], int, int)
void zeroOriginatingReplacementCharacter()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - if something went wrong
void eof()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - if something went wrong
void endTokenization()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - if something went wrong
boolean cdataSectionAllowed()
throws org.xml.sax.SAXException
true if CDATA sections are allowed
org.xml.sax.SAXException - if something went wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||