|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface must be implemented by the users of the XMLDocumentScanner class. These methods form the abstraction between the implementation semantics and the more generic task of scanning the XML non-DTD grammar.
Method Summary | |
void |
callCharacters(int ch)
Report the scanning of character data |
void |
callComment(int data)
Report the scanning of a comment |
void |
callEndDocument()
Signal the end of a document |
boolean |
callEndElement(int readerId)
signal the scanning of an end element tag |
void |
callProcessingInstruction(int piTarget,
int piData)
Report the scanning of a processing instruction |
void |
callStartDocument(int version,
int encoding,
int standalone)
Signal the start of a document |
void |
callStartElement(int elementType)
signal the scanning of a start element tag |
void |
endCDATA()
Signal the end of a CDATA section |
int |
scanAttributeName(XMLEntityHandler.EntityReader entityReader,
int elementType)
Scan an attribute name. |
int |
scanAttValue(int elementType,
int attrName)
Scan the value of an attribute and include it in the set of specified attributes for the element. |
void |
scanDoctypeDecl(boolean standalone)
Scan the document type declaration |
int |
scanElementType(XMLEntityHandler.EntityReader entityReader,
char fastchar)
Scan an element type. |
boolean |
scanExpectedElementType(XMLEntityHandler.EntityReader entityReader,
char fastchar)
Scan the expected element type. |
void |
startCDATA()
Signal the start of a CDATA section |
boolean |
validEncName(java.lang.String encoding)
Check for a valid encoding name |
boolean |
validVersionNum(java.lang.String version)
Check for a valid XML version number |
Method Detail |
public int scanElementType(XMLEntityHandler.EntityReader entityReader, char fastchar) throws java.lang.Exception
entityReader
- The entity reader.fastchar
- A likely non-name character that might terminate the element type.public boolean scanExpectedElementType(XMLEntityHandler.EntityReader entityReader, char fastchar) throws java.lang.Exception
entityReader
- The entity reader.fastchar
- A likely non-name character that might terminate the element type.true
if we scanned the expected element type; otherwise
false
if we were not able to scan an element type at the
current location, or if that element type was not the one we expected to
find.public int scanAttributeName(XMLEntityHandler.EntityReader entityReader, int elementType) throws java.lang.Exception
entityReader
- The entity reader.elementType
- The element type for this attribute.public void callStartDocument(int version, int encoding, int standalone) throws java.lang.Exception
version
- the handle in the string pool for the version numberencoding
- the handle in the string pool for the encodingstandalong
- the handle in the string pool for the standalone valuepublic void callEndDocument() throws java.lang.Exception
public void callStartElement(int elementType) throws java.lang.Exception
elementType
- handle to the elementType being scannedpublic boolean callEndElement(int readerId) throws java.lang.Exception
readerId
- the Id of the reader being used to scan the end tag.public boolean validVersionNum(java.lang.String version) throws java.lang.Exception
version
- a string representing an XML version numberpublic boolean validEncName(java.lang.String encoding) throws java.lang.Exception
encoding
- a string containing an encoding naempublic void startCDATA() throws java.lang.Exception
public void endCDATA() throws java.lang.Exception
public void callCharacters(int ch) throws java.lang.Exception
ch
- the handle in the string pool of the character data that was scannedpublic void callProcessingInstruction(int piTarget, int piData) throws java.lang.Exception
piTarget
- the handle in the string pool of the processing instruction targepiData
- the handle in the string pool of the processing instruction datapublic void callComment(int data) throws java.lang.Exception
data
- the handle in the string pool of the comment textpublic void scanDoctypeDecl(boolean standalone) throws java.lang.Exception
standalone
- true if there was a standalone document declaration in
the XMLDeclpublic int scanAttValue(int elementType, int attrName) throws java.lang.Exception
elementType
- handle for the element type of the attribute.attrName
- handle for the attribute name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |