XMLToken - Oracle 9i

Syntax

public interface XMLToken

Description
Basic interface for XMLTokenAll 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.


XMLToken

XMLToken

Fields
AttListDecl

public static final int AttListDecl AttListDecl ::= '<' '!' 'ATTLIST' S Name AttDef* S? '>'

AttName

public static final int AttName AttName ::= Name

Attribute

public static final int Attribute Attribute ::= AttName Eq AttValue

AttValue

CDSect

CharData

public static final int CharData CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)

Comment

public static final int Comment Comment ::= '<' '!' '--' ((Char - '-') | ('-' (Char - '-')))* '-->'

DTDName

public static final int DTDName DTDName ::= name

ElemDeclName

public static final int ElemDeclName ElemDeclName ::= name

elementdecl

public static final int elementdecl elementdecl ::= '<' '!ELEMENT' S ElemDeclName S contentspec S? '>'

EmptyElemTag

public static final int EmptyElemTag EmptyElemTag ::= '<' STagName (S Attribute)* S? '/' '>'

EntityDecl

EntityDeclName

EntityValue

public static final int EntityValue EntityDeclName ::= Name

ETag

public static final int ETag ETag ::= '<' '/' ETagName S? '>'

ETagName

public static final int ETagName ETagName ::= Name

ExternalID

public static final int ExternalID ExternalID ::= 'SYSTEM' S SystemLiteral

| 'PUBLIC' S PubidLiteral S SystemLiteral

NotationDecl

public static final int NotationDecl NotationDecl ::= '<' '!NOTATION' S Name S (ExternalID | PublicID) S? '>'

PI

public static final int PI PI ::= '<' '?' PITarget (S (Char* - (Char* '?>' Char*)))? '?' '>'

PITarget

public static final int PITarget PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

Reference

STag

public static final int STag STag ::= '<' STagName (S Attribute)* S? '>'

STagName

public static final int STagName STagName ::= Name

TextDecl

public static final int TextDecl TextDecl ::= '<' '?' 'xml' VersionInfo? EncodingDecl S? '?>'

XMLDecl

public static final int XMLDecl XMLDecl ::= '<' '?' 'xml' VersionInfo EncodingDecl? SDDecl? S? '?' '>'

Methods
token(int, String)

public void token(int token, java.lang.String value) The interface call-back method. Receives an XML token and it's corresponding value

Parameters

token - The XML token constant as specified in the interface. value - The corresponding substring from the parsed text.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle 9i Topics