org.apache.xerces.framework
Class XMLParser

java.lang.Object
  |
  +--org.apache.xerces.framework.XMLParser
Direct Known Subclasses:
DOMParser, SAXParser

public abstract class XMLParser
extends java.lang.Object
implements XMLErrorReporter, XMLEntityHandler, XMLDocumentScanner.EventHandler, DTDValidator.EventHandler, Locator

This is the base class of all standard parsers.

Version:
 

Inner classes inherited from class org.apache.xerces.readers.XMLEntityHandler
XMLEntityHandler.CharBuffer, XMLEntityHandler.EntityReader
 
Field Summary
protected  int fCurrentElementEntity
           
protected  int fCurrentElementType
           
protected  DTDValidator fDTDValidator
           
protected  int fElementDepth
           
protected  XMLEntityHandler fEntityHandler
           
protected  XMLErrorReporter fErrorReporter
           
protected  boolean fInElementContent
           
protected  boolean fNamespacesEnabled
           
protected  java.lang.String fNamespaceSep
           
protected  boolean fParseInProgress
           
protected  XMLEntityReaderFactory fReaderFactory
           
protected  XMLDocumentScanner fScanner
           
protected  XSchemaValidator fSchemaValidator
           
protected  StringPool fStringPool
           
protected  XMLValidator fValidator
           
protected static java.lang.String SAX2_FEATURES_PREFIX
          SAX2 features prefix (http://xml.org/sax/features/).
protected static java.lang.String SAX2_PROPERTIES_PREFIX
          SAX2 properties prefix (http://xml.org/sax/properties/).
protected static java.lang.String XERCES_FEATURES_PREFIX
          Xerces features prefix (http://apache.org/xml/features/).
protected static java.lang.String XERCES_PROPERTIES_PREFIX
          Xerces properties prefix (http://apache.org/xml/properties/).
 
Fields inherited from interface org.apache.xerces.framework.XMLErrorReporter
ERRORTYPE_FATAL_ERROR, ERRORTYPE_RECOVERABLE_ERROR, ERRORTYPE_WARNING
 
Fields inherited from interface org.apache.xerces.readers.XMLEntityHandler
ATTVALUE_RESULT_COMPLEX, ATTVALUE_RESULT_INVALID_CHAR, ATTVALUE_RESULT_LESSTHAN, CHARREF_RESULT_INVALID_CHAR, CHARREF_RESULT_OUT_OF_RANGE, CHARREF_RESULT_SEMICOLON_REQUIRED, CONTENT_RESULT_END_OF_CDSECT, CONTENT_RESULT_INVALID_CHAR, CONTENT_RESULT_MARKUP_END_OF_INPUT, CONTENT_RESULT_MARKUP_NOT_RECOGNIZED, CONTENT_RESULT_MATCHING_ETAG, CONTENT_RESULT_REFERENCE_END_OF_INPUT, CONTENT_RESULT_START_OF_CDSECT, CONTENT_RESULT_START_OF_CHARREF, CONTENT_RESULT_START_OF_COMMENT, CONTENT_RESULT_START_OF_ELEMENT, CONTENT_RESULT_START_OF_ENTITYREF, CONTENT_RESULT_START_OF_ETAG, CONTENT_RESULT_START_OF_PI, CONTEXT_DOCUMENT, CONTEXT_EXTERNAL_SUBSET, CONTEXT_IN_ATTVALUE, CONTEXT_IN_CONTENT, CONTEXT_IN_DEFAULTATTVALUE, CONTEXT_IN_DTD_AS_MARKUP, CONTEXT_IN_DTD_WITHIN_MARKUP, CONTEXT_IN_ENTITYVALUE, ENTITYTYPE_DOCUMENT, ENTITYTYPE_EXTERNAL, ENTITYTYPE_EXTERNAL_PE, ENTITYTYPE_EXTERNAL_SUBSET, ENTITYTYPE_INTERNAL, ENTITYTYPE_INTERNAL_PE, ENTITYTYPE_UNPARSED, ENTITYVALUE_RESULT_END_OF_INPUT, ENTITYVALUE_RESULT_FINISHED, ENTITYVALUE_RESULT_INVALID_CHAR, ENTITYVALUE_RESULT_PEREF, ENTITYVALUE_RESULT_REFERENCE, STRINGLIT_RESULT_INVALID_CHAR, STRINGLIT_RESULT_QUOTE_REQUIRED
 
Constructor Summary
protected XMLParser()
          Constructor
 
Method Summary
 void addRecognizer(XMLDeclRecognizer recognizer)
          Adds a recognizer.
abstract  void attlistDecl(int elementType, int attrName, int attType, java.lang.String enumString, int attDefaultType, int attDefaultValue)
          callback for an attribute list declaration.
 void callCharacters(int ch)
          Call the characters callback.
 void callComment(int comment)
          Call the comment callback.
 void callEndDocument()
          Call the end document callback.
 boolean callEndElement(int readerId)
          Call the end element callback.
 void callProcessingInstruction(int target, int data)
          Call the processing instruction callback.
 void callStartDocument(int version, int encoding, int standalone)
          Call the start document callback.
 void callStartElement(int elementType)
          Call the start element callback.
 XMLEntityHandler.EntityReader changeReaders()
          This method is called by the reader subclasses at the end of input, and also by the scanner directly to force a reader change during error recovery.
abstract  void characters(char[] ch, int start, int length)
          callback for characters.
abstract  void characters(int data)
          callback for characters (string pool form).
abstract  void comment(int comment)
          callback for comment.
 void commentInDTD(int comment)
          Callback for comment in DTD.
abstract  void elementDecl(int elementType, XMLValidator.ContentSpec contentSpec)
          callback for an element declaration.
abstract  void endCDATA()
          callback for end of CDATA section.
abstract  void endDocument()
          callback for the end of document.
abstract  void endDTD()
          callback for the end of the DTD This function will be called at the end of the DTD.
abstract  void endElement(int elementType)
          callback for end of element.
 void endEntityDecl()
          end an entity declaration
abstract  void endEntityReference(int entityName, int entityType, int entityContext)
          callback for end of entity reference.
abstract  void endNamespaceDeclScope(int prefix)
          callback for the end a namespace declaration scope.
 java.lang.String expandSystemId(java.lang.String systemId)
          Expands a system id and returns the system id as a URL, if it can be expanded.
abstract  void externalEntityDecl(int entityName, int publicId, int systemId)
          callback for external general entity declaration.
abstract  void externalPEDecl(int entityName, int publicId, int systemId)
          callback for an external parameter entity declaration.
protected  boolean getAllowJavaEncodings()
          Returns true if Java encoding names are allowed in the XML document.
 int getColumnNumber()
          Return the column number of the current position within the document that we are processing.
protected  boolean getContinueAfterFatalError()
          Returns true if the parser continues after a fatal error.
 XMLEntityHandler.EntityReader getEntityReader()
          get the Entity reader.
 EntityResolver getEntityResolver()
          Return the current entity resolver.
 ErrorHandler getErrorHandler()
          Return the current error handler.
protected  boolean getExternalGeneralEntities()
          Note: This feature is always true.
protected  boolean getExternalParameterEntities()
          Note: This feature is always true.
 boolean getFeature(java.lang.String featureId)
          Query the state of a feature.
 java.lang.String[] getFeaturesRecognized()
          Returns a list of features that this parser recognizes.
 int getLineNumber()
          Return the line number of the current position within the document that we are processing.
 Locator getLocator()
          return the locator being used by the parser
protected  boolean getNamespaces()
          Returns true if the parser preprocesses namespaces.
 java.lang.String[] getPropertiesRecognized()
          Returns a list of properties that this parser recognizes.
 java.lang.Object getProperty(java.lang.String propertyId)
          Query the value of a property.
 java.lang.String getPublicId()
          Return the public identifier of the InputSource that we are processing.
 int getReaderDepth()
          This method is provided for scanner implementations.
 int getReaderId()
          This method is provided for scanner implementations.
protected  XSchemaValidator getSchemaValidator()
          Returns the XML Schema validator.
 java.lang.String getSystemId()
          Return the system identifier of the InputSource that we are processing.
protected  boolean getValidation()
          Returns true if validation is turned on.
protected  boolean getValidationDynamic()
          Returns true if validation is based on whether a document contains a grammar.
protected  boolean getValidationWarnOnDuplicateAttdef()
          Returns true if an error is emitted when an attribute is redefined in the grammar.
protected  boolean getValidationWarnOnUndeclaredElemdef()
          Returns true if the parser emits an error when an undeclared element is referenced in the grammar.
abstract  void ignorableWhitespace(char[] ch, int start, int length)
          callback for ignorable whitespace.
abstract  void ignorableWhitespace(int data)
          callback for ignorable whitespace.
abstract  void internalEntityDecl(int entityName, int entityValue)
          callback for internal general entity declaration.
abstract  void internalPEDecl(int entityName, int entityValue)
          callback for an internal parameter entity declaration.
abstract  void internalSubset(int internalSubset)
          Supports DOM Level 2 internalSubset additions.
 boolean isFeatureRecognized(java.lang.String featureId)
          Returns true if the specified feature is recognized.
 boolean isPropertyRecognized(java.lang.String propertyId)
          Returns true if the specified property is recognized.
abstract  void notationDecl(int notationName, int publicId, int systemId)
          callback for a notation declaration.
 void parse(InputSource source)
          Parses the specified input source.
 void parse(java.lang.String systemId)
          Parses the input source specified by the given system identifier.
 boolean parseSome()
          Application-driven parsing.
 boolean parseSomeSetup(InputSource source)
          Setup for application-driven parsing.
 void processCharacters(char[] chars, int offset, int length)
          Character data.
 void processCharacters(int data)
          Character data.
abstract  void processingInstruction(int target, int data)
          callback for processing instruction.
 void processingInstructionInDTD(int target, int data)
          Callback for processing instruction in DTD.
 void processWhitespace(char[] chars, int offset, int length)
          White space.
 void processWhitespace(int data)
          White space.
 void reportError(Locator locator, java.lang.String errorDomain, int majorCode, int minorCode, java.lang.Object[] args, int errorType)
          Report an error.
 void reset()
          Reset parser instance so that it can be reused.
protected  void resetOrCopy()
          Reset or copy parser Allows parser instance reuse
 int scanAttributeName(XMLEntityHandler.EntityReader entityReader, int elementType)
          Scans an attribute name.
 int scanAttValue(int elementType, int attrName)
          Scan an attribute value.
 void scanDoctypeDecl(boolean standalone)
          Scan doctype decl.
 int scanElementType(XMLEntityHandler.EntityReader entityReader, char fastchar)
          Scans an element type.
 boolean scanExpectedElementType(XMLEntityHandler.EntityReader entityReader, char fastchar)
          Scans an expected element type.
protected  void setAllowJavaEncodings(boolean allow)
          Allows the use of Java encoding names in the XMLDecl and TextDecl lines in an XML document.
protected  void setContinueAfterFatalError(boolean continueAfterFatalError)
          Allows the parser to continue after a fatal error.
 void setEntityResolver(EntityResolver resolver)
          Sets the resolver used to resolve external entities.
 void setErrorHandler(ErrorHandler handler)
          Sets the error handler.
protected  void setExternalGeneralEntities(boolean expand)
          Note: Currently, this parser always expands external general entities. Setting this feature to false will throw a SAXNotSupportedException.
protected  void setExternalParameterEntities(boolean expand)
          Note: Currently, this parser always expands external parameter entities. Setting this feature to false will throw a SAXNotSupportedException.
 void setFeature(java.lang.String featureId, boolean state)
          Set the state of a feature.
 void setLocale(java.util.Locale locale)
          Set the locale to use for messages.
 void setLocator(Locator locator)
          Sets the locator.
protected  void setNamespaces(boolean process)
          Sets whether the parser preprocesses namespaces.
 void setProperty(java.lang.String propertyId, java.lang.Object value)
          Set the value of a property.
 void setReaderDepth(int depth)
          This method is provided for scanner implementations.
 void setReaderFactory(XMLEntityReaderFactory readerFactory)
          Set the reader factory.
protected  void setSendCharDataAsCharArray(boolean flag)
          Set char data processing preference.
 void setValidating(boolean flag)
          Tell the parser that we are validating
protected  void setValidation(boolean validate)
          Sets whether the parser validates.
protected  void setValidationDynamic(boolean dynamic)
          Allows the parser to validate a document only when it contains a grammar.
protected  void setValidationWarnOnDuplicateAttdef(boolean warn)
          Sets whether an error is emitted when an attribute is redefined in the grammar.
protected  void setValidationWarnOnUndeclaredElemdef(boolean warn)
          Sets whether the parser emits an error when an element's content model references an element by name that is not declared in the grammar.
abstract  void startCDATA()
          callback for start of CDATA section.
abstract  void startDocument(int version, int encoding, int standAlone)
          Callback for start of document If the there is no version info, encoding info, or standalone info, the corresponding argument will be set to -1.
abstract  void startDTD(int rootElementType, int publicId, int systemId)
          callback for the start of the DTD This function will be called when a <!DOCTYPE...> declaration is encountered.
abstract  void startElement(int elementType, XMLAttrList attrList, int attrListHandle)
          callback for the start of element.
 boolean startEntityDecl(boolean isPE, int entityName)
          start an entity declaration
abstract  void startEntityReference(int entityName, int entityType, int entityContext)
          callback for start of entity reference.
abstract  void startNamespaceDeclScope(int prefix, int uri)
          callback for the start of a namespace declaration scope.
 boolean startReadingFromDocument(InputSource source)
          set up the reader stack to read from the document entity
 boolean startReadingFromEntity(int entityName, int readerDepth, int context)
          start reading from an external entity
 void startReadingFromExternalSubset(java.lang.String publicId, java.lang.String systemId, int readerDepth)
          start reading from an external DTD subset
 void stopReadingFromExternalSubset()
          stop reading from an external DTD subset
abstract  void unparsedEntityDecl(int entityName, int publicId, int systemId, int notationName)
          callback for an unparsed entity declaration.
 boolean validEncName(java.lang.String encoding)
          Returns true if the specified encoding is valid.
 boolean validVersionNum(java.lang.String version)
          Returns true if the specified version is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAX2_FEATURES_PREFIX

protected static final java.lang.String SAX2_FEATURES_PREFIX
SAX2 features prefix (http://xml.org/sax/features/).

SAX2_PROPERTIES_PREFIX

protected static final java.lang.String SAX2_PROPERTIES_PREFIX
SAX2 properties prefix (http://xml.org/sax/properties/).

XERCES_FEATURES_PREFIX

protected static final java.lang.String XERCES_FEATURES_PREFIX
Xerces features prefix (http://apache.org/xml/features/).

XERCES_PROPERTIES_PREFIX

protected static final java.lang.String XERCES_PROPERTIES_PREFIX
Xerces properties prefix (http://apache.org/xml/properties/).

fParseInProgress

protected boolean fParseInProgress

fNamespaceSep

protected java.lang.String fNamespaceSep

fValidator

protected XMLValidator fValidator

fDTDValidator

protected DTDValidator fDTDValidator

fSchemaValidator

protected XSchemaValidator fSchemaValidator

fNamespacesEnabled

protected boolean fNamespacesEnabled

fScanner

protected XMLDocumentScanner fScanner

fStringPool

protected StringPool fStringPool

fErrorReporter

protected XMLErrorReporter fErrorReporter

fEntityHandler

protected XMLEntityHandler fEntityHandler

fReaderFactory

protected XMLEntityReaderFactory fReaderFactory

fElementDepth

protected int fElementDepth

fCurrentElementType

protected int fCurrentElementType

fCurrentElementEntity

protected int fCurrentElementEntity

fInElementContent

protected boolean fInElementContent
Constructor Detail

XMLParser

protected XMLParser()
Constructor
Method Detail

getFeaturesRecognized

public java.lang.String[] getFeaturesRecognized()
Returns a list of features that this parser recognizes. This method will never return null; if no features are recognized, this method will return a zero length array.
See Also:
isFeatureRecognized(java.lang.String), setFeature(java.lang.String, boolean), getFeature(java.lang.String)

isFeatureRecognized

public boolean isFeatureRecognized(java.lang.String featureId)
Returns true if the specified feature is recognized.
See Also:
getFeaturesRecognized(), setFeature(java.lang.String, boolean), getFeature(java.lang.String)

getPropertiesRecognized

public java.lang.String[] getPropertiesRecognized()
Returns a list of properties that this parser recognizes. This method will never return null; if no properties are recognized, this method will return a zero length array.
See Also:
isPropertyRecognized(java.lang.String), setProperty(java.lang.String, java.lang.Object), getProperty(java.lang.String)

isPropertyRecognized

public boolean isPropertyRecognized(java.lang.String propertyId)
Returns true if the specified property is recognized.
See Also:
getPropertiesRecognized(), setProperty(java.lang.String, java.lang.Object), getProperty(java.lang.String)

parseSomeSetup

public boolean parseSomeSetup(InputSource source)
                       throws java.lang.Exception
Setup for application-driven parsing.
Parameters:
source - the input source to be parsed.
See Also:
parseSome()

parseSome

public boolean parseSome()
                  throws java.lang.Exception
Application-driven parsing.
See Also:
parseSomeSetup(org.xml.sax.InputSource)

reset

public void reset()
           throws java.lang.Exception
Reset parser instance so that it can be reused.

setLocator

public void setLocator(Locator locator)
Sets the locator.
Specified by:
setLocator in interface XMLErrorReporter
Parameters:
locator - The new locator.

getLocator

public final Locator getLocator()
return the locator being used by the parser
Specified by:
getLocator in interface XMLErrorReporter
Returns:
the parser's active locator

setReaderFactory

public void setReaderFactory(XMLEntityReaderFactory readerFactory)
Set the reader factory.

processingInstructionInDTD

public void processingInstructionInDTD(int target,
                                       int data)
                                throws java.lang.Exception
Callback for processing instruction in DTD.
Specified by:
processingInstructionInDTD in interface DTDValidator.EventHandler
Parameters:
target - the string pool index of the PI's target
data - the string pool index of the PI's data
Throws:
java.lang.Exception -  

commentInDTD

public void commentInDTD(int comment)
                  throws java.lang.Exception
Callback for comment in DTD.
Specified by:
commentInDTD in interface DTDValidator.EventHandler
Parameters:
comment - the string pool index of the comment text
Throws:
java.lang.Exception -  

startDocument

public abstract void startDocument(int version,
                                   int encoding,
                                   int standAlone)
                            throws java.lang.Exception
Callback for start of document If the there is no version info, encoding info, or standalone info, the corresponding argument will be set to -1.
Parameters:
version - string pool index of the version attribute's value
encoding - string pool index of the encoding attribute's value
standAlone - string pool index of the standalone attribute's value
Throws:
java.lang.Exception -  

endDocument

public abstract void endDocument()
                          throws java.lang.Exception
callback for the end of document.
Throws:
java.lang.Exception -  

startNamespaceDeclScope

public abstract void startNamespaceDeclScope(int prefix,
                                             int uri)
                                      throws java.lang.Exception
callback for the start of a namespace declaration scope.
Specified by:
startNamespaceDeclScope in interface DTDValidator.EventHandler
Parameters:
prefix - string pool index of the namespace prefix being declared
uri - string pool index of the namespace uri begin bound
java.lang.Exception -  

endNamespaceDeclScope

public abstract void endNamespaceDeclScope(int prefix)
                                    throws java.lang.Exception
callback for the end a namespace declaration scope.
Specified by:
endNamespaceDeclScope in interface DTDValidator.EventHandler
Parameters:
prefix - string pool index of the namespace prefix being declared
Throws:
java.lang.Exception -  

internalSubset

public abstract void internalSubset(int internalSubset)
Supports DOM Level 2 internalSubset additions. Called when the internal subset is completely scanned.
Specified by:
internalSubset in interface DTDValidator.EventHandler

startElement

public abstract void startElement(int elementType,
                                  XMLAttrList attrList,
                                  int attrListHandle)
                           throws java.lang.Exception
callback for the start of element.
Parameters:
elementType - element handle for the element being scanned
attrList - attrList containing the attributes of the element
attrListHandle - handle into attrList. Allows attributes to be retreived.
Throws:
java.lang.Exception -  

endElement

public abstract void endElement(int elementType)
                         throws java.lang.Exception
callback for end of element.
Parameters:
elementType - element handle for the element being scanned
Throws:
java.lang.Exception -  

startEntityReference

public abstract void startEntityReference(int entityName,
                                          int entityType,
                                          int entityContext)
                                   throws java.lang.Exception
callback for start of entity reference.
Parameters:
entityName - string pool index of the entity name
entityType - the XMLEntityHandler.ENTITYTYPE_* type
entityContext - the XMLEntityHandler.CONTEXT_* type for where the entity reference appears
Throws:
java.lang.Exception -  
See Also:
XMLEntityHandler, XMLEntityHandler

endEntityReference

public abstract void endEntityReference(int entityName,
                                        int entityType,
                                        int entityContext)
                                 throws java.lang.Exception
callback for end of entity reference.
Parameters:
entityName - string pool index of the entity anem
entityType - the XMLEntityHandler.ENTITYTYPE_* type
entityContext - the XMLEntityHandler.CONTEXT_* type for where the entity reference appears
Throws:
java.lang.Exception -  
See Also:
XMLEntityHandler, XMLEntityHandler

startCDATA

public abstract void startCDATA()
                         throws java.lang.Exception
callback for start of CDATA section. this callback marks the start of a CDATA section
Specified by:
startCDATA in interface XMLDocumentScanner.EventHandler
Throws:
java.lang.Exception -  

endCDATA

public abstract void endCDATA()
                       throws java.lang.Exception
callback for end of CDATA section. this callback marks the end of a CDATA section
Specified by:
endCDATA in interface XMLDocumentScanner.EventHandler
Throws:
java.lang.Exception -  

processingInstruction

public abstract void processingInstruction(int target,
                                           int data)
                                    throws java.lang.Exception
callback for processing instruction.
Parameters:
target - string pool index of the PI target
data - string pool index of the PI data
Throws:
java.lang.Exception -  

comment

public abstract void comment(int comment)
                      throws java.lang.Exception
callback for comment.
Parameters:
comment - string pool index of the comment text
Throws:
java.lang.Exception -  

characters

public abstract void characters(int data)
                         throws java.lang.Exception
callback for characters (string pool form).
Parameters:
data - string pool index of the characters that were scanned
Throws:
java.lang.Exception -  

characters

public abstract void characters(char[] ch,
                                int start,
                                int length)
                         throws java.lang.Exception
callback for characters.
Parameters:
ch - character array containing the characters that were scanned
start - offset in ch where scanned characters begin
length - length of scanned characters in ch
Throws:
java.lang.Exception -  

ignorableWhitespace

public abstract void ignorableWhitespace(int data)
                                  throws java.lang.Exception
callback for ignorable whitespace.
Parameters:
data - string pool index of ignorable whitespace
Throws:
java.lang.Exception -  

ignorableWhitespace

public abstract void ignorableWhitespace(char[] ch,
                                         int start,
                                         int length)
                                  throws java.lang.Exception
callback for ignorable whitespace.
Parameters:
ch - character array containing the whitespace that was scanned
start - offset in ch where scanned whitespace begins
length - length of scanned whitespace in ch
Throws:
java.lang.Exception -  

startDTD

public abstract void startDTD(int rootElementType,
                              int publicId,
                              int systemId)
                       throws java.lang.Exception
callback for the start of the DTD This function will be called when a <!DOCTYPE...> declaration is encountered.
Specified by:
startDTD in interface DTDValidator.EventHandler
Parameters:
rootElementType - element handle for the root element of the document
publicId - string pool index of the DTD's public ID
systemId - string pool index of the DTD's system ID
Throws:
java.lang.Exception -  

endDTD

public abstract void endDTD()
                     throws java.lang.Exception
callback for the end of the DTD This function will be called at the end of the DTD.
Specified by:
endDTD in interface DTDValidator.EventHandler

elementDecl

public abstract void elementDecl(int elementType,
                                 XMLValidator.ContentSpec contentSpec)
                          throws java.lang.Exception
callback for an element declaration.
Specified by:
elementDecl in interface DTDValidator.EventHandler
Parameters:
elementType - element handle of the element being declared
contentSpec - contentSpec for the element being declared
Throws:
java.lang.Exception -  
See Also:
XMLValidator.ContentSpec

attlistDecl

public abstract void attlistDecl(int elementType,
                                 int attrName,
                                 int attType,
                                 java.lang.String enumString,
                                 int attDefaultType,
                                 int attDefaultValue)
                          throws java.lang.Exception
callback for an attribute list declaration.
Specified by:
attlistDecl in interface DTDValidator.EventHandler
Parameters:
elementType - element handle for the attribute's element
attrName - string pool index of the attribute name
attType - type of attribute
enumString - String representing the values of the enumeration, if the attribute is of enumerated type, or null if it is not.
attDefaultType - an integer value denoting the DefaultDecl value
attDefaultValue - string pool index of this attribute's default value or -1 if there is no defaultvalue
Throws:
java.lang.Exception -  

internalPEDecl

public abstract void internalPEDecl(int entityName,
                                    int entityValue)
                             throws java.lang.Exception
callback for an internal parameter entity declaration.
Specified by:
internalPEDecl in interface DTDValidator.EventHandler
Parameters:
entityName - string pool index of the entity name
entityValue - string pool index of the entity replacement text
Throws:
java.lang.Exception -  

externalPEDecl

public abstract void externalPEDecl(int entityName,
                                    int publicId,
                                    int systemId)
                             throws java.lang.Exception
callback for an external parameter entity declaration.
Specified by:
externalPEDecl in interface DTDValidator.EventHandler
Parameters:
entityName - string pool index of the entity name
publicId - string pool index of the entity's public id.
systemId - string pool index of the entity's system id.
Throws:
java.lang.Exception -  

internalEntityDecl

public abstract void internalEntityDecl(int entityName,
                                        int entityValue)
                                 throws java.lang.Exception
callback for internal general entity declaration.
Specified by:
internalEntityDecl in interface DTDValidator.EventHandler
Parameters:
entityName - string pool index of the entity name
entityValue - string pool index of the entity replacement text
Throws:
java.lang.Exception -  

externalEntityDecl

public abstract void externalEntityDecl(int entityName,
                                        int publicId,
                                        int systemId)
                                 throws java.lang.Exception
callback for external general entity declaration.
Specified by:
externalEntityDecl in interface DTDValidator.EventHandler
Parameters:
entityName - string pool index of the entity name
publicId - string pool index of the entity's public id.
systemId - string pool index of the entity's system id.
Throws:
java.lang.Exception -  

unparsedEntityDecl

public abstract void unparsedEntityDecl(int entityName,
                                        int publicId,
                                        int systemId,
                                        int notationName)
                                 throws java.lang.Exception
callback for an unparsed entity declaration.
Specified by:
unparsedEntityDecl in interface DTDValidator.EventHandler
Parameters:
entityName - string pool index of the entity name
publicId - string pool index of the entity's public id.
systemId - string pool index of the entity's system id.
notationName - string pool index of the notation name.
Throws:
java.lang.Exception -  

notationDecl

public abstract void notationDecl(int notationName,
                                  int publicId,
                                  int systemId)
                           throws java.lang.Exception
callback for a notation declaration.
Specified by:
notationDecl in interface DTDValidator.EventHandler
Parameters:
notationName - string pool index of the notation name
publicId - string pool index of the notation's public id.
systemId - string pool index of the notation's system id.
Throws:
java.lang.Exception -  

setValidation

protected void setValidation(boolean validate)
                      throws SAXNotRecognizedException,
                             SAXNotSupportedException
Sets whether the parser validates.

This method is the equivalent to the feature:

 http://xml.org/sax/features/validation
 
Parameters:
validate - True to validate; false to not validate.
See Also:
getValidation(), setFeature(java.lang.String, boolean)

getValidation

protected boolean getValidation()
                         throws SAXNotRecognizedException,
                                SAXNotSupportedException
Returns true if validation is turned on.
See Also:
setValidation(boolean)

setExternalGeneralEntities

protected void setExternalGeneralEntities(boolean expand)
                                   throws SAXNotRecognizedException,
                                          SAXNotSupportedException
Note: Currently, this parser always expands external general entities. Setting this feature to false will throw a SAXNotSupportedException.

Sets whether external general entities are expanded.

This method is the equivalent to the feature:

 http://xml.org/sax/features/external-general-entities
 
Parameters:
expand - True to expand external general entities; false to not expand.
See Also:
getExternalGeneralEntities(), setFeature(java.lang.String, boolean)

getExternalGeneralEntities

protected boolean getExternalGeneralEntities()
                                      throws SAXNotRecognizedException,
                                             SAXNotSupportedException
Note: This feature is always true.

Returns true if external general entities are expanded.

See Also:
setExternalGeneralEntities(boolean)

setExternalParameterEntities

protected void setExternalParameterEntities(boolean expand)
                                     throws SAXNotRecognizedException,
                                            SAXNotSupportedException
Note: Currently, this parser always expands external parameter entities. Setting this feature to false will throw a SAXNotSupportedException.

Sets whether external parameter entities are expanded.

This method is the equivalent to the feature:

 http://xml.org/sax/features/external-parameter-entities
 
Parameters:
expand - True to expand external parameter entities; false to not expand.
See Also:
getExternalParameterEntities(), setFeature(java.lang.String, boolean)

getExternalParameterEntities

protected boolean getExternalParameterEntities()
                                        throws SAXNotRecognizedException,
                                               SAXNotSupportedException
Note: This feature is always true.

Returns true if external parameter entities are expanded.

See Also:
setExternalParameterEntities(boolean)

setNamespaces

protected void setNamespaces(boolean process)
                      throws SAXNotRecognizedException,
                             SAXNotSupportedException
Sets whether the parser preprocesses namespaces.

This method is the equivalent to the feature:

 http://xml.org/sax/features/namespaces
 
Parameters:
process - True to process namespaces; false to not process.
See Also:
getNamespaces(), setFeature(java.lang.String, boolean)

getNamespaces

protected boolean getNamespaces()
                         throws SAXNotRecognizedException,
                                SAXNotSupportedException
Returns true if the parser preprocesses namespaces.
See Also:
setNamespaces(boolean)

setValidationDynamic

protected void setValidationDynamic(boolean dynamic)
                             throws SAXNotRecognizedException,
                                    SAXNotSupportedException
Allows the parser to validate a document only when it contains a grammar. Validation is turned on/off based on each document instance, automatically.

This method is the equivalent to the feature:

 http://apache.org/xml/features/validation/dynamic
 
Parameters:
dynamic - True to dynamically validate documents; false to validate based on the validation feature.
See Also:
getValidationDynamic(), setFeature(java.lang.String, boolean)

getValidationDynamic

protected boolean getValidationDynamic()
                                throws SAXNotRecognizedException,
                                       SAXNotSupportedException
Returns true if validation is based on whether a document contains a grammar.
See Also:
setValidationDynamic(boolean)

setValidationWarnOnDuplicateAttdef

protected void setValidationWarnOnDuplicateAttdef(boolean warn)
                                           throws SAXNotRecognizedException,
                                                  SAXNotSupportedException
Sets whether an error is emitted when an attribute is redefined in the grammar.

This method is the equivalent to the feature:

 http://apache.org/xml/features/validation/warn-on-duplicate-attdef
 
Parameters:
warn - True to warn; false to not warn.
See Also:
getValidationWarnOnDuplicateAttdef(), setFeature(java.lang.String, boolean)

getValidationWarnOnDuplicateAttdef

protected boolean getValidationWarnOnDuplicateAttdef()
                                              throws SAXNotRecognizedException,
                                                     SAXNotSupportedException
Returns true if an error is emitted when an attribute is redefined in the grammar.
See Also:
setValidationWarnOnDuplicateAttdef(boolean)

setValidationWarnOnUndeclaredElemdef

protected void setValidationWarnOnUndeclaredElemdef(boolean warn)
                                             throws SAXNotRecognizedException,
                                                    SAXNotSupportedException
Sets whether the parser emits an error when an element's content model references an element by name that is not declared in the grammar.

This method is the equivalent to the feature:

 http://apache.org/xml/features/validation/warn-on-undeclared-elemdef
 
Parameters:
warn - True to warn; false to not warn.
See Also:
getValidationWarnOnUndeclaredElemdef(), setFeature(java.lang.String, boolean)

getValidationWarnOnUndeclaredElemdef

protected boolean getValidationWarnOnUndeclaredElemdef()
                                                throws SAXNotRecognizedException,
                                                       SAXNotSupportedException
Returns true if the parser emits an error when an undeclared element is referenced in the grammar.
See Also:
setValidationWarnOnUndeclaredElemdef(boolean)

setAllowJavaEncodings

protected void setAllowJavaEncodings(boolean allow)
                              throws SAXNotRecognizedException,
                                     SAXNotSupportedException
Allows the use of Java encoding names in the XMLDecl and TextDecl lines in an XML document.

This method is the equivalent to the feature:

 http://apache.org/xml/features/allow-java-encodings
 
Parameters:
allow - True to allow Java encoding names; false to disallow.
See Also:
getAllowJavaEncodings(), setFeature(java.lang.String, boolean)

getAllowJavaEncodings

protected boolean getAllowJavaEncodings()
                                 throws SAXNotRecognizedException,
                                        SAXNotSupportedException
Returns true if Java encoding names are allowed in the XML document.
See Also:
setAllowJavaEncodings(boolean)

setContinueAfterFatalError

protected void setContinueAfterFatalError(boolean continueAfterFatalError)
                                   throws SAXNotRecognizedException,
                                          SAXNotSupportedException
Allows the parser to continue after a fatal error. Normally, a fatal error would stop the parse.

This method is the equivalent to the feature:

 http://apache.org/xml/features/continue-after-fatal-error
 
Parameters:
continueAfterFatalError - True to continue; false to stop on fatal error.
See Also:
getContinueAfterFatalError(), setFeature(java.lang.String, boolean)

getContinueAfterFatalError

protected boolean getContinueAfterFatalError()
                                      throws SAXNotRecognizedException,
                                             SAXNotSupportedException
Returns true if the parser continues after a fatal error.
See Also:
setContinueAfterFatalError(boolean)

resetOrCopy

protected void resetOrCopy()
                    throws java.lang.Exception
Reset or copy parser Allows parser instance reuse

getSchemaValidator

protected XSchemaValidator getSchemaValidator()
Returns the XML Schema validator.

setSendCharDataAsCharArray

protected void setSendCharDataAsCharArray(boolean flag)
Set char data processing preference.

setEntityResolver

public void setEntityResolver(EntityResolver resolver)
Sets the resolver used to resolve external entities. The EntityResolver interface supports resolution of public and system identifiers.
Parameters:
resolver - The new entity resolver. Passing a null value will uninstall the currently installed resolver.

getEntityResolver

public EntityResolver getEntityResolver()
Return the current entity resolver.
Returns:
The current entity resolver, or null if none has been registered.
See Also:
setEntityResolver(org.xml.sax.EntityResolver)

setErrorHandler

public void setErrorHandler(ErrorHandler handler)
Sets the error handler.
Parameters:
handler - The new error handler.

getErrorHandler

public ErrorHandler getErrorHandler()
Return the current error handler.
Returns:
The current error handler, or null if none has been registered.
See Also:
setErrorHandler(org.xml.sax.ErrorHandler)

parse

public void parse(InputSource source)
           throws SAXException,
                  java.io.IOException
Parses the specified input source.
Parameters:
source - The input source.
Throws:
SAXException - Throws exception on SAX error.
java.io.IOException - Throws exception on i/o error.

parse

public void parse(java.lang.String systemId)
           throws SAXException,
                  java.io.IOException
Parses the input source specified by the given system identifier.

This method is equivalent to the following:

     parse(new InputSource(systemId));
 
Parameters:
source - The input source.
Throws:
SAXException - Throws exception on SAX error.
java.io.IOException - Throws exception on i/o error.

setLocale

public void setLocale(java.util.Locale locale)
               throws SAXException
Set the locale to use for messages.
Parameters:
locale - The locale object to use for localization of messages.
Throws:
SAXException - An exception thrown if the parser does not support the specified locale.
See Also:
Parser

reportError

public void reportError(Locator locator,
                        java.lang.String errorDomain,
                        int majorCode,
                        int minorCode,
                        java.lang.Object[] args,
                        int errorType)
                 throws java.lang.Exception
Report an error.
Specified by:
reportError in interface XMLErrorReporter
Parameters:
locator - Location of error.
errorDomain - The error domain.
majorCode - The major code of the error.
minorCode - The minor code of the error.
args - Arguments for replacement text.
errorType - The type of the error.
Throws:
java.lang.Exception - Thrown on error.
See Also:
XMLErrorReporter.ERRORTYPE_WARNING, XMLErrorReporter.ERRORTYPE_FATAL_ERROR

setFeature

public void setFeature(java.lang.String featureId,
                       boolean state)
                throws SAXNotRecognizedException,
                       SAXNotSupportedException
Set the state of a feature. Set the state of any feature in a SAX2 parser. The parser might not recognize the feature, and if it does recognize it, it might not be able to fulfill the request.
Parameters:
featureId - The unique identifier (URI) of the feature.
state - The requested state of the feature (true or false).
Throws:
SAXNotRecognizedException - If the requested feature is not known.
SAXNotSupportedException - If the requested feature is known, but the requested state is not supported.
SAXException - If there is any other problem fulfilling the request.

getFeature

public boolean getFeature(java.lang.String featureId)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
Query the state of a feature. Query the current state of any feature in a SAX2 parser. The parser might not recognize the feature.
Parameters:
featureId - The unique identifier (URI) of the feature being set.
Returns:
The current state of the feature.
Throws:
SAXNotRecognizedException - If the requested feature is not known.
SAXException - If there is any other problem fulfilling the request.

setProperty

public void setProperty(java.lang.String propertyId,
                        java.lang.Object value)
                 throws SAXNotRecognizedException,
                        SAXNotSupportedException
Set the value of a property. Set the value of any property in a SAX2 parser. The parser might not recognize the property, and if it does recognize it, it might not support the requested value.
Parameters:
propertyId - The unique identifier (URI) of the property being set.
Object - The value to which the property is being set.
Throws:
SAXNotRecognizedException - If the requested property is not known.
SAXNotSupportedException - If the requested property is known, but the requested value is not supported.
SAXException - If there is any other problem fulfilling the request.

getProperty

public java.lang.Object getProperty(java.lang.String propertyId)
                             throws SAXNotRecognizedException,
                                    SAXNotSupportedException
Query the value of a property. Return the current value of a property in a SAX2 parser. The parser might not recognize the property.
Parameters:
propertyId - The unique identifier (URI) of the property being set.
Returns:
The current value of the property.
Throws:
SAXNotRecognizedException - If the requested property is not known.
SAXException - If there is any other problem fulfilling the request.
See Also:
org.xml.sax.Configurable#getProperty

validVersionNum

public boolean validVersionNum(java.lang.String version)
Returns true if the specified version is valid.
Specified by:
validVersionNum in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Parameters:
version - a string representing an XML version number
Returns:
true if the parser can process this version of XML
Throws:
java.lang.Exception -  

validEncName

public boolean validEncName(java.lang.String encoding)
Returns true if the specified encoding is valid.
Specified by:
validEncName in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Parameters:
encoding - a string containing an encoding naem
Returns:
true if the encoding name is valid
Throws:
java.lang.Exception -  

callStartDocument

public void callStartDocument(int version,
                              int encoding,
                              int standalone)
                       throws java.lang.Exception
Call the start document callback.
Specified by:
callStartDocument in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Parameters:
version - the handle in the string pool for the version number
encoding - the handle in the string pool for the encoding
standalong - the handle in the string pool for the standalone value
Throws:
java.lang.Exception -  

callEndDocument

public void callEndDocument()
                     throws java.lang.Exception
Call the end document callback.
Specified by:
callEndDocument in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Throws:
java.lang.Exception -  

callStartElement

public void callStartElement(int elementType)
                      throws java.lang.Exception
Call the start element callback.
Specified by:
callStartElement in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Parameters:
elementType - handle to the elementType being scanned
Throws:
java.lang.Exception -  

callEndElement

public boolean callEndElement(int readerId)
                       throws java.lang.Exception
Call the end element callback.
Specified by:
callEndElement in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Parameters:
readerId - the Id of the reader being used to scan the end tag.
Throws:
java.lang.Exception -  

callProcessingInstruction

public void callProcessingInstruction(int target,
                                      int data)
                               throws java.lang.Exception
Call the processing instruction callback.
Specified by:
callProcessingInstruction in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Parameters:
piTarget - the handle in the string pool of the processing instruction targe
piData - the handle in the string pool of the processing instruction data
Throws:
java.lang.Exception -  

callComment

public void callComment(int comment)
                 throws java.lang.Exception
Call the comment callback.
Specified by:
callComment in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Parameters:
data - the handle in the string pool of the comment text
Throws:
java.lang.Exception -  

callCharacters

public void callCharacters(int ch)
                    throws java.lang.Exception
Call the characters callback.
Specified by:
callCharacters in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Parameters:
ch - the handle in the string pool of the character data that was scanned
Throws:
java.lang.Exception -  

scanAttValue

public int scanAttValue(int elementType,
                        int attrName)
                 throws java.lang.Exception
Scan an attribute value.
Specified by:
scanAttValue in interface XMLDocumentScanner.EventHandler
Parameters:
elementType -  
attrName -  
Returns:
XMLDocumentScanner.RESULT_SUCCESS if the attribute was created, XMLDocumentScanner.RESULT_NOT_WELL_FORMED if the scan failed, or XMLDocumentScanner.RESULT_DUPLICATE_ATTR if the attribute is a duplicate.
Throws:
java.lang.Exception -  

scanElementType

public int scanElementType(XMLEntityHandler.EntityReader entityReader,
                           char fastchar)
                    throws java.lang.Exception
Scans an element type.
Specified by:
scanElementType in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Parameters:
entityReader - The entity reader.
fastchar - A likely non-name character that might terminate the element type.
Returns:
The handle in the string pool for the element type scanned, or -1 if we were not able to scan an element type at the current location.
Throws:
java.lang.Exception -  

scanExpectedElementType

public boolean scanExpectedElementType(XMLEntityHandler.EntityReader entityReader,
                                       char fastchar)
                                throws java.lang.Exception
Scans an expected element type.
Specified by:
scanExpectedElementType in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Parameters:
entityReader - The entity reader.
fastchar - A likely non-name character that might terminate the element type.
Returns:
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.
Throws:
java.lang.Exception -  

scanAttributeName

public int scanAttributeName(XMLEntityHandler.EntityReader entityReader,
                             int elementType)
                      throws java.lang.Exception
Scans an attribute name.
Specified by:
scanAttributeName in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Parameters:
entityReader - The entity reader.
elementType - The element type for this attribute.
Returns:
The handle in the string pool for the attribute name scanned, or -1 if we were not able to scan an attribute name at the current location.
Throws:
java.lang.Exception -  

scanDoctypeDecl

public void scanDoctypeDecl(boolean standalone)
                     throws java.lang.Exception
Scan doctype decl.
Specified by:
scanDoctypeDecl in interface XMLDocumentScanner.EventHandler
Tags copied from interface: XMLDocumentScanner.EventHandler
Parameters:
standalone - true if there was a standalone document declaration in the XMLDecl
Throws:
java.lang.Exception -  

setValidating

public void setValidating(boolean flag)
                   throws java.lang.Exception
Tell the parser that we are validating
Specified by:
setValidating in interface DTDValidator.EventHandler
Tags copied from interface: DTDValidator.EventHandler
Parameters:
flag - true if validation is occuring

processCharacters

public void processCharacters(char[] chars,
                              int offset,
                              int length)
                       throws java.lang.Exception
Character data.
Specified by:
processCharacters in interface XMLEntityHandler
Tags copied from interface: XMLEntityHandler
Parameters:
chars - character buffer to be processed
offset - offset in buffer where the data starts
length - length of characters to be processed
Throws:
java.lang.Exception -  

processCharacters

public void processCharacters(int data)
                       throws java.lang.Exception
Character data.
Specified by:
processCharacters in interface XMLEntityHandler
Tags copied from interface: XMLEntityHandler
Parameters:
stringHandle - StringPool handle to the character data
Throws:
java.lang.Exception -  

processWhitespace

public void processWhitespace(char[] chars,
                              int offset,
                              int length)
                       throws java.lang.Exception
White space.
Specified by:
processWhitespace in interface XMLEntityHandler
Tags copied from interface: XMLEntityHandler
Parameters:
chars - character buffer to be processed
offset - offset in buffer where the data starts
length - length of whitespace to be processed
Throws:
java.lang.Exception -  

processWhitespace

public void processWhitespace(int data)
                       throws java.lang.Exception
White space.
Specified by:
processWhitespace in interface XMLEntityHandler
Tags copied from interface: XMLEntityHandler
Parameters:
stringHandle - StringPool handle to the whitespace
Throws:
java.lang.Exception -  

getEntityReader

public XMLEntityHandler.EntityReader getEntityReader()
get the Entity reader.
Specified by:
getEntityReader in interface XMLEntityHandler

addRecognizer

public void addRecognizer(XMLDeclRecognizer recognizer)
Adds a recognizer.
Parameters:
recognizer - The XML recognizer to add.

expandSystemId

public java.lang.String expandSystemId(java.lang.String systemId)
Expands a system id and returns the system id as a URL, if it can be expanded. A return value of null means that the identifier is already expanded. An exception thrown indicates a failure to expand the id.
Specified by:
expandSystemId in interface XMLEntityHandler
Parameters:
systemId - The systemId to be expanded.
Returns:
Returns the URL object representing the expanded system identifier. A null value indicates that the given system identifier is already expanded.

startReadingFromDocument

public boolean startReadingFromDocument(InputSource source)
                                 throws java.lang.Exception
set up the reader stack to read from the document entity
Specified by:
startReadingFromDocument in interface XMLEntityHandler
Tags copied from interface: XMLEntityHandler
Parameters:
source - The input source for the document to process.
Returns:
true if we were able to open the document source; false otherwise.
Throws:
java.lang.Exception -  

startReadingFromExternalSubset

public void startReadingFromExternalSubset(java.lang.String publicId,
                                           java.lang.String systemId,
                                           int readerDepth)
                                    throws java.lang.Exception
start reading from an external DTD subset
Specified by:
startReadingFromExternalSubset in interface XMLEntityHandler
Tags copied from interface: XMLEntityHandler
Parameters:
publicId - The public identifier for the external subset.
systemId - The system identifier for the external subset.
readerDepth - The depth to associate with the reader for the external subset.
Throws:
java.lang.Exception -  

stopReadingFromExternalSubset

public void stopReadingFromExternalSubset()
                                   throws java.lang.Exception
stop reading from an external DTD subset
Specified by:
stopReadingFromExternalSubset in interface XMLEntityHandler
Tags copied from interface: XMLEntityHandler
Throws:
java.lang.Exception -  

startReadingFromEntity

public boolean startReadingFromEntity(int entityName,
                                      int readerDepth,
                                      int context)
                               throws java.lang.Exception
start reading from an external entity
Specified by:
startReadingFromEntity in interface XMLEntityHandler
Tags copied from interface: XMLEntityHandler
Parameters:
entityName - The entity name handle in the string pool.
readerDepth - The depth to associate with the reader for this entity.
context - The context of the entity reference; see CONTEXT_IN_*.
Returns:
true if the entity might start with a TextDecl; false otherwise.
Throws:
java.lang.Exception -  

startEntityDecl

public boolean startEntityDecl(boolean isPE,
                               int entityName)
                        throws java.lang.Exception
start an entity declaration
Specified by:
startEntityDecl in interface XMLEntityHandler
Tags copied from interface: XMLEntityHandler
Returns:
true on success; otherwise false if the entity declaration is recursive.
Throws:
java.lang.Exception -  

endEntityDecl

public void endEntityDecl()
                   throws java.lang.Exception
end an entity declaration
Specified by:
endEntityDecl in interface XMLEntityHandler
Tags copied from interface: XMLEntityHandler
Throws:
java.lang.Exception -  

getReaderId

public int getReaderId()
This method is provided for scanner implementations.
Specified by:
getReaderId in interface XMLEntityHandler

setReaderDepth

public void setReaderDepth(int depth)
This method is provided for scanner implementations.
Specified by:
setReaderDepth in interface XMLEntityHandler

getReaderDepth

public int getReaderDepth()
This method is provided for scanner implementations.
Specified by:
getReaderDepth in interface XMLEntityHandler

getPublicId

public java.lang.String getPublicId()
Return the public identifier of the InputSource that we are processing.
Specified by:
getPublicId in interface XMLEntityHandler
Returns:
The public identifier, or null if not provided.

getSystemId

public java.lang.String getSystemId()
Return the system identifier of the InputSource that we are processing.
Specified by:
getSystemId in interface XMLEntityHandler
Returns:
The system identifier, or null if not provided.

getLineNumber

public int getLineNumber()
Return the line number of the current position within the document that we are processing.
Specified by:
getLineNumber in interface Locator
Returns:
The current line number.

getColumnNumber

public int getColumnNumber()
Return the column number of the current position within the document that we are processing.
Specified by:
getColumnNumber in interface Locator
Returns:
The current column number.

changeReaders

public XMLEntityHandler.EntityReader changeReaders()
                                            throws java.lang.Exception
This method is called by the reader subclasses at the end of input, and also by the scanner directly to force a reader change during error recovery.
Specified by:
changeReaders in interface XMLEntityHandler
Tags copied from interface: XMLEntityHandler
Returns:
The reader to use next.
Throws:
java.lang.Exception -  


Copyright © 1999 Apache XML Project. All Rights Reserved.