All Packages Class Hierarchy This Package Previous Next Index
All XMLParser applications with Tokenizer feature must implement this interface.
The interface has to be registered using XMLParser method
setTokenHandler(XMLToken handler).
If XMLtoken handler != null then for each registered and found token
the parser calls the XMLToken call-back method token(int token, String value).
During tokenizing the parser doesn't validate the document and doesn't include/read
internal/external entities.
If XMLtoken handler == null then the parser parses as usual.
A request for XML token is registered (on/off) using XMLParser method
setToken (int token, boolean set). The requests could be registered
during the parsing (from inside the call-back method) as well.
The XML tokens are defined as public constants in XMLToken interface.
They correspond to the XML syntax variables from W3C XML Syntax Specification.
AttListDecl ::= '<' '!' 'ATTLIST' S Name AttDef* S? '>'
AttName ::= Name
Attribute ::= AttName Eq AttValue
AttValue ::= '"' ([^<&"] | Reference)* '"'
| "'" ([^<&'] | Reference)* "'"
CDSect ::= CDStart CData CDEnd
CDStart ::= '<' '!' '[CDATA['
CData ::= (Char* - (Char* ']]>' Char*))
CDEnd ::= ']]>'
CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
Comment ::= '<' '!' '--' ((Char - '-') | ('-' (Char - '-')))* '-->'
DTDName ::= name
ElemDeclName ::= name
elementdecl ::= '<' '!ELEMENT' S ElemDeclName S contentspec S? '>'
EmptyElemTag ::= '<' STagName (S Attribute)* S? '/' '>'
EntityDecl ::= '<' '!' ENTITY' S EntityDeclName S EntityDef S? '>'
| '<' '!' ENTITY' S '%' S EntityDeclName S PEDef S? '>'
EntityDef ::= EntityValue | (ExternalID NDataDecl?)
PEDef ::= EntityValue | ExternalID
EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'
| "'" ([^%&'] | PEReference | Reference)* "'"
EntityDeclName ::= Name
ETag ::= '<' '/' ETagName S? '>'
ETagName ::= Name
ExternalID ::= 'SYSTEM' S SystemLiteral
| 'PUBLIC' S PubidLiteral S SystemLiteral
NotationDecl ::= '<' '!NOTATION' S Name S (ExternalID | PublicID) S? '>'
PI ::= '<' '?' PITarget (S (Char* - (Char* '?>' Char*)))? '?' '>'
PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
Reference ::= EntityRef | CharRef | PEReference
EntityRef ::= '&' Name ';'
PEReference ::= '%' Name ';'
CharRef ::= '' [0-9]+ ';' | '' [0-9a-fA-F]+ ';
STag ::= '<' STagName (S Attribute)* S? '>'
STagName ::= Name
TextDecl ::= '<' '?' 'xml' VersionInfo? EncodingDecl S? '?>'
XMLDecl ::= '<' '?' 'xml' VersionInfo EncodingDecl? SDDecl? S? '?' '>'
public static final int STag
STag ::= '<' STagName (S Attribute)* S? '>'
public static final int EmptyElemTag
EmptyElemTag ::= '<' STagName (S Attribute)* S? '/' '>'
public static final int STagName
STagName ::= Name
public static final int AttValue
AttValue ::= '"' ([^<&"] | Reference)* '"'
| "'" ([^<&'] | Reference)* "'"
public static final int AttName
AttName ::= Name
public static final int Attribute
Attribute ::= AttName Eq AttValue
public static final int ETag
ETag ::= '<' '/' ETagName S? '>'
public static final int ETagName
ETagName ::= Name
public static final int CharData
CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
public static final int Comment
Comment ::= '<' '!' '--' ((Char - '-') | ('-' (Char - '-')))* '-->'
public static final int Reference
Reference ::= EntityRef | CharRef | PEReference
EntityRef ::= '&' Name ';'
PEReference ::= '%' Name ';'
CharRef ::= '' [0-9]+ ';' | '' [0-9a-fA-F]+ ';
public static final int CDSect
CDSect ::= CDStart CData CDEnd
CDStart ::= '<' '!' '[CDATA['
CData ::= (Char* - (Char* ']]>' Char*))
CDEnd ::= ']]>'
public static final int PI
PI ::= '<' '?' PITarget (S (Char* - (Char* '?>' Char*)))? '?' '>'
public static final int PITarget
PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
public static final int XMLDecl
XMLDecl ::= '<' '?' 'xml' VersionInfo EncodingDecl? SDDecl? S? '?' '>'
public static final int TextDecl
TextDecl ::= '<' '?' 'xml' VersionInfo? EncodingDecl S? '?>'
public static final int DTDName
DTDName ::= name
public static final int AttListDecl
AttListDecl ::= '<' '!' 'ATTLIST' S Name AttDef* S? '>'
public static final int elementdecl
elementdecl ::= '<' '!ELEMENT' S ElemDeclName S contentspec S? '>'
public static final int ElemDeclName
ElemDeclName ::= name
public static final int EntityDecl
EntityDecl ::= '<' '!' ENTITY' S EntityDeclName S EntityDef S? '>'
| '<' '!' ENTITY' S '%' S EntityDeclName S PEDef S? '>'
EntityDef ::= EntityValue | (ExternalID NDataDecl?)
PEDef ::= EntityValue | ExternalID
public static final int EntityValue
EntityDeclName ::= Name
public static final int EntityDeclName
EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'
| "'" ([^%&'] | PEReference | Reference)* "'"
public static final int NotationDecl
NotationDecl ::= '<' '!NOTATION' S Name S (ExternalID | PublicID) S? '>'
public static final int ExternalID
ExternalID ::= 'SYSTEM' S SystemLiteral
| 'PUBLIC' S PubidLiteral S SystemLiteral
public abstract void token(int token,
String value)
All Packages Class Hierarchy This Package Previous Next Index