Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.xml.parser.v2
Interface XMLToken

public interface XMLToken

Basic interface for XMLToken

All XMLParser applications with Tokenizer feature must implement this interface. The interface has to be registered using `XMLTokenizer` 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.

Field Summary
`static int` | `AttListDecl` AttListDecl ::= '<' '!'
`static int` | `AttName` AttName ::= Name
`static int` | `Attribute` Attribute ::= AttName Eq AttValue
`static int` | `AttValue` AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
`static int` | `CDSect` CDSect ::= CDStart CData CDEnd CDStart ::= '<' '!'
`static int` | `CharData` CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
`static int` | `Comment` Comment ::= '<' '!'
`static int` | `DTDName` DTDName ::= name
`static int` | `ElemDeclName` ElemDeclName ::= name
`static int` | `elementdecl` elementdecl ::= '<' '!
`static int` | `EmptyElemTag` EmptyElemTag ::= '<' STagName (S Attribute)* S?
`static int` | `EntityDecl` EntityDecl ::= '<' '!'
`static int` | `EntityDeclName` EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | "'" ([^%&'] | PEReference | Reference)* "'"
`static int` | `EntityValue` EntityDeclName ::= Name
`static int` | `ETag` ETag ::= '<' '/' ETagName S?
`static int` | `ETagName` ETagName ::= Name
`static int` | `ExternalID` ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral
`static int` | `NotationDecl` NotationDecl ::= '<' '!
`static int` | `PI` PI ::= '<' '?'
`static int` | `PITarget` PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
`static int` | `Reference` Reference ::= EntityRef | CharRef | PEReference EntityRef ::= '&' Name ';' PEReference ::= '%' Name ';' CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';
`static int` | `STag` STag ::= '<' STagName (S Attribute)* S?
`static int` | `STagName` STagName ::= Name
`static int` | `TextDecl` TextDecl ::= '<' '?'
`static int` | `XMLDecl` XMLDecl ::= '<' '?'

Method Summary
`void` | `token(int token, java.lang.String value)` The interface call-back method.

Field Detail

### STag

    public static final int STag

  STag ::= '<' STagName (S Attribute)* S? '>'

  See Also:
    Constant Field Values

### EmptyElemTag

    public static final int EmptyElemTag

  EmptyElemTag ::= '<' STagName (S Attribute)* S? '/' '>'

  See Also:
    Constant Field Values

### STagName

    public static final int STagName

  STagName ::= Name

  See Also:
    Constant Field Values

### AttValue

    public static final int AttValue

  AttValue ::= '"' ([^<&"] | Reference)* '"'

  | "'" ([^<&'] | Reference)* "'"

  See Also:
    Constant Field Values

### AttName

    public static final int AttName

  AttName ::= Name

  See Also:
    Constant Field Values

### Attribute

    public static final int Attribute

  Attribute ::= AttName Eq AttValue

  See Also:
    Constant Field Values

### ETag

    public static final int ETag

  ETag ::= '<' '/' ETagName S? '>'

  See Also:
    Constant Field Values

### ETagName

    public static final int ETagName

  ETagName ::= Name

  See Also:
    Constant Field Values

### CharData

    public static final int CharData

  CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)

  See Also:
    Constant Field Values

### Comment

    public static final int Comment

  Comment ::= '<' '!' '--' ((Char - '-') | ('-' (Char - '-')))* '-->'

  See Also:
    Constant Field Values

### Reference

    public static final int Reference

  Reference ::= EntityRef | CharRef | PEReference

  EntityRef ::= '&' Name ';'

  PEReference ::= '%' Name ';'

  CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';

  See Also:
    Constant Field Values

### CDSect

    public static final int CDSect

  CDSect ::= CDStart CData CDEnd

  CDStart ::= '<' '!' '[CDATA['

  CData ::= (Char* - (Char* ']]>' Char*))

  CDEnd ::= ']]>'

  See Also:
    Constant Field Values

### PI

    public static final int PI

  PI ::= '<' '?' PITarget (S (Char* - (Char* '?>' Char*)))? '?' '>'

  See Also:
    Constant Field Values

### PITarget

    public static final int PITarget

  PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

  See Also:
    Constant Field Values

### XMLDecl

    public static final int XMLDecl

  XMLDecl ::= '<' '?' 'xml' VersionInfo EncodingDecl? SDDecl? S? '?' '>'

  See Also:
    Constant Field Values

### TextDecl

    public static final int TextDecl

  TextDecl ::= '<' '?' 'xml' VersionInfo? EncodingDecl S? '?>'

  See Also:
    Constant Field Values

### DTDName

    public static final int DTDName

  DTDName ::= name

  See Also:
    Constant Field Values

### AttListDecl

    public static final int AttListDecl

  AttListDecl ::= '<' '!' 'ATTLIST' S Name AttDef* S? '>'

  See Also:
    Constant Field Values

### elementdecl

    public static final int elementdecl

  elementdecl ::= '<' '!ELEMENT' S ElemDeclName S contentspec S? '>'

  See Also:
    Constant Field Values

### ElemDeclName

    public static final int ElemDeclName

  ElemDeclName ::= name

  See Also:
    Constant Field Values

### EntityDecl

    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

  See Also:
    Constant Field Values

### EntityValue

    public static final int EntityValue

  EntityDeclName ::= Name

  See Also:
    Constant Field Values

### EntityDeclName

    public static final int EntityDeclName

  EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'

  | "'" ([^%&'] | PEReference | Reference)* "'"

  See Also:
    Constant Field Values

### NotationDecl

    public static final int NotationDecl

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

  See Also:
    Constant Field Values

### ExternalID

    public static final int ExternalID

  ExternalID ::= 'SYSTEM' S SystemLiteral

  | 'PUBLIC' S PubidLiteral S SystemLiteral

  See Also:
    Constant Field Values

Method Detail

### token

    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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003, 2004, Oracle. All rights reserved.