Class XMLDocumentFragmentScannerImpl
- java.lang.Object
-
- org.apache.xerces.impl.XMLScanner
-
- org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
-
- All Implemented Interfaces:
XMLEntityHandler,org.apache.xerces.xni.parser.XMLComponent,org.apache.xerces.xni.parser.XMLDocumentScanner,org.apache.xerces.xni.parser.XMLDocumentSource
- Direct Known Subclasses:
XMLDocumentScannerImpl
public class XMLDocumentFragmentScannerImpl extends XMLScanner implements org.apache.xerces.xni.parser.XMLDocumentScanner, org.apache.xerces.xni.parser.XMLComponent, XMLEntityHandler
This class is responsible for scanning the structure and content of document fragments. The scanner acts as the source for the document information which is communicated to the document handler.This component requires the following features and properties from the component manager that uses it:
- http://xml.org/sax/features/validation
- http://apache.org/xml/features/scanner/notify-char-refs
- http://apache.org/xml/features/scanner/notify-builtin-refs
- http://apache.org/xml/properties/internal/symbol-table
- http://apache.org/xml/properties/internal/error-reporter
- http://apache.org/xml/properties/internal/entity-manager
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: XMLDocumentFragmentScannerImpl.java 572055 2007-09-02 17:55:43Z mrglavas $
- Author:
- Glenn Marcy, IBM, Andy Clark, IBM, Arnaud Le Hors, IBM, Eric Ye, IBM
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceXMLDocumentFragmentScannerImpl.DispatcherThis interface defines an XML "event" dispatching model.protected static classXMLDocumentFragmentScannerImpl.ElementStackElement stack.protected classXMLDocumentFragmentScannerImpl.FragmentContentDispatcherDispatcher to handle content scanning.
-
Field Summary
Fields Modifier and Type Field Description protected static booleanDEBUG_CONTENT_SCANNINGDebug content dispatcher scanning.protected static java.lang.StringENTITY_RESOLVERProperty identifier: entity resolver.protected org.apache.xerces.xni.QNamefAttributeQNameAttribute QName.protected XMLAttributesImplfAttributesElement attributes.protected XMLDocumentFragmentScannerImpl.DispatcherfContentDispatcherContent dispatcher.protected org.apache.xerces.xni.QNamefCurrentElementCurrent element.protected XMLDocumentFragmentScannerImpl.DispatcherfDispatcherActive dispatcher.protected org.apache.xerces.xni.XMLDocumentHandlerfDocumentHandlerDocument handler.protected org.apache.xerces.xni.QNamefElementQNameElement QName.protected XMLDocumentFragmentScannerImpl.ElementStackfElementStackElement stack.protected int[]fEntityStackEntity stack.protected ExternalSubsetResolverfExternalSubsetResolverExternal subset resolver.protected booleanfHasExternalDTDhas external dtdprotected booleanfInScanContentSubScanner state: inside scanContent method.protected booleanfIsEntityDeclaredVCTrue if [Entity Declared] is a VC; false if it is a WFC.protected intfMarkupDepthMarkup depth.protected booleanfNotifyBuiltInRefsNotify built-in references.protected intfScannerStateScanner state.protected booleanfStandaloneStandalone.protected org.apache.xerces.xni.XMLStringfTempStringString.protected org.apache.xerces.xni.XMLStringfTempString2String.protected static java.lang.StringNAMESPACESFeature identifier: namespaces.protected static java.lang.StringNOTIFY_BUILTIN_REFSFeature identifier: notify built-in refereces.protected static intSCANNER_STATE_CDATAScanner state: CDATA section.protected static intSCANNER_STATE_COMMENTScanner state: comment.protected static intSCANNER_STATE_CONTENTScanner state: content.protected static intSCANNER_STATE_DOCTYPEScanner state: DOCTYPE.protected static intSCANNER_STATE_END_OF_INPUTScanner state: end of input.protected static intSCANNER_STATE_PIScanner state: processing instruction.protected static intSCANNER_STATE_REFERENCEScanner state: reference.protected static intSCANNER_STATE_ROOT_ELEMENTScanner state: root element.protected static intSCANNER_STATE_START_OF_MARKUPScanner state: start of markup.protected static intSCANNER_STATE_TERMINATEDScanner state: terminated.protected static intSCANNER_STATE_TEXT_DECLScanner state: Text declaration.-
Fields inherited from class org.apache.xerces.impl.XMLScanner
DEBUG_ATTR_NORMALIZATION, ENTITY_MANAGER, ERROR_REPORTER, fAmpSymbol, fAposSymbol, fCharRefLiteral, fEncodingSymbol, fEntityDepth, fEntityManager, fEntityScanner, fErrorReporter, fGtSymbol, fLtSymbol, fNamespaces, fNotifyCharRefs, fParserSettings, fQuotSymbol, fReportEntity, fResourceIdentifier, fScanningAttribute, fStandaloneSymbol, fSymbolTable, fValidation, fVersionSymbol, NOTIFY_CHAR_REFS, PARSER_SETTINGS, SYMBOL_TABLE, VALIDATION
-
-
Constructor Summary
Constructors Constructor Description XMLDocumentFragmentScannerImpl()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected XMLDocumentFragmentScannerImpl.DispatchercreateContentDispatcher()Creates a content dispatcher.voidendEntity(java.lang.String name, org.apache.xerces.xni.Augmentations augs)This method notifies the end of an entity.java.lang.StringgetDispatcherName(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)Returns the dispatcher name.org.apache.xerces.xni.XMLDocumentHandlergetDocumentHandler()Returns the document handlerjava.lang.BooleangetFeatureDefault(java.lang.String featureId)Returns the default state for a feature, or null if this component does not want to report a default value for this feature.java.lang.ObjectgetPropertyDefault(java.lang.String propertyId)Returns the default state for a property, or null if this component does not want to report a default value for this property.java.lang.String[]getRecognizedFeatures()Returns a list of feature identifiers that are recognized by this component.java.lang.String[]getRecognizedProperties()Returns a list of property identifiers that are recognized by this component.protected java.lang.StringgetScannerStateName(int state)Returns the scanner state name.protected inthandleEndElement(org.apache.xerces.xni.QName element, boolean isEmpty)Handles the end element.voidreset(org.apache.xerces.xni.parser.XMLComponentManager componentManager)Resets the component.protected voidscanAttribute(org.apache.xerces.xni.XMLAttributes attributes)Scans an attribute.protected booleanscanCDATASection(boolean complete)Scans a CDATA section.protected voidscanCharReference()Scans a character reference.protected voidscanComment()Scans a comment.protected intscanContent()Scans element content.booleanscanDocument(boolean complete)Scans a document.protected intscanEndElement()Scans an end element.protected voidscanEntityReference()Scans an entity reference.protected voidscanPIData(java.lang.String target, org.apache.xerces.xni.XMLString data)Scans a processing data.protected booleanscanStartElement()Scans a start element.protected booleanscanStartElementAfterName()Scans the remainder of a start or empty tag after the element name.protected voidscanStartElementName()Scans the name of an element in a start or empty tag.protected voidscanXMLDeclOrTextDecl(boolean scanningTextDecl)Scans an XML or text declaration.protected voidsetDispatcher(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)Sets the dispatcher.voidsetDocumentHandler(org.apache.xerces.xni.XMLDocumentHandler documentHandler)setDocumentHandlervoidsetFeature(java.lang.String featureId, boolean state)Sets the state of a feature.voidsetInputSource(org.apache.xerces.xni.parser.XMLInputSource inputSource)Sets the input source.voidsetProperty(java.lang.String propertyId, java.lang.Object value)Sets the value of a property.protected voidsetScannerState(int state)Sets the scanner state.voidstartEntity(java.lang.String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, java.lang.String encoding, org.apache.xerces.xni.Augmentations augs)This method notifies of the start of an entity.-
Methods inherited from class org.apache.xerces.impl.XMLScanner
getFeature, getVersionNotSupportedKey, isInvalid, isInvalidLiteral, isUnchangedByNormalization, isValidNameChar, isValidNameStartChar, isValidNameStartHighSurrogate, isValidNCName, normalizeWhitespace, normalizeWhitespace, reportFatalError, reset, scanAttributeValue, scanCharReferenceValue, scanComment, scanExternalID, scanPI, scanPseudoAttribute, scanPubidLiteral, scanSurrogates, scanXMLDeclOrTextDecl, versionSupported
-
-
-
-
Field Detail
-
SCANNER_STATE_START_OF_MARKUP
protected static final int SCANNER_STATE_START_OF_MARKUP
Scanner state: start of markup.- See Also:
- Constant Field Values
-
SCANNER_STATE_COMMENT
protected static final int SCANNER_STATE_COMMENT
Scanner state: comment.- See Also:
- Constant Field Values
-
SCANNER_STATE_PI
protected static final int SCANNER_STATE_PI
Scanner state: processing instruction.- See Also:
- Constant Field Values
-
SCANNER_STATE_DOCTYPE
protected static final int SCANNER_STATE_DOCTYPE
Scanner state: DOCTYPE.- See Also:
- Constant Field Values
-
SCANNER_STATE_ROOT_ELEMENT
protected static final int SCANNER_STATE_ROOT_ELEMENT
Scanner state: root element.- See Also:
- Constant Field Values
-
SCANNER_STATE_CONTENT
protected static final int SCANNER_STATE_CONTENT
Scanner state: content.- See Also:
- Constant Field Values
-
SCANNER_STATE_REFERENCE
protected static final int SCANNER_STATE_REFERENCE
Scanner state: reference.- See Also:
- Constant Field Values
-
SCANNER_STATE_END_OF_INPUT
protected static final int SCANNER_STATE_END_OF_INPUT
Scanner state: end of input.- See Also:
- Constant Field Values
-
SCANNER_STATE_TERMINATED
protected static final int SCANNER_STATE_TERMINATED
Scanner state: terminated.- See Also:
- Constant Field Values
-
SCANNER_STATE_CDATA
protected static final int SCANNER_STATE_CDATA
Scanner state: CDATA section.- See Also:
- Constant Field Values
-
SCANNER_STATE_TEXT_DECL
protected static final int SCANNER_STATE_TEXT_DECL
Scanner state: Text declaration.- See Also:
- Constant Field Values
-
NAMESPACES
protected static final java.lang.String NAMESPACES
Feature identifier: namespaces.- See Also:
- Constant Field Values
-
NOTIFY_BUILTIN_REFS
protected static final java.lang.String NOTIFY_BUILTIN_REFS
Feature identifier: notify built-in refereces.- See Also:
- Constant Field Values
-
ENTITY_RESOLVER
protected static final java.lang.String ENTITY_RESOLVER
Property identifier: entity resolver.- See Also:
- Constant Field Values
-
DEBUG_CONTENT_SCANNING
protected static final boolean DEBUG_CONTENT_SCANNING
Debug content dispatcher scanning.- See Also:
- Constant Field Values
-
fDocumentHandler
protected org.apache.xerces.xni.XMLDocumentHandler fDocumentHandler
Document handler.
-
fEntityStack
protected int[] fEntityStack
Entity stack.
-
fMarkupDepth
protected int fMarkupDepth
Markup depth.
-
fScannerState
protected int fScannerState
Scanner state.
-
fInScanContent
protected boolean fInScanContent
SubScanner state: inside scanContent method.
-
fHasExternalDTD
protected boolean fHasExternalDTD
has external dtd
-
fStandalone
protected boolean fStandalone
Standalone.
-
fIsEntityDeclaredVC
protected boolean fIsEntityDeclaredVC
True if [Entity Declared] is a VC; false if it is a WFC.
-
fExternalSubsetResolver
protected ExternalSubsetResolver fExternalSubsetResolver
External subset resolver.
-
fCurrentElement
protected org.apache.xerces.xni.QName fCurrentElement
Current element.
-
fElementStack
protected final XMLDocumentFragmentScannerImpl.ElementStack fElementStack
Element stack.
-
fNotifyBuiltInRefs
protected boolean fNotifyBuiltInRefs
Notify built-in references.
-
fDispatcher
protected XMLDocumentFragmentScannerImpl.Dispatcher fDispatcher
Active dispatcher.
-
fContentDispatcher
protected final XMLDocumentFragmentScannerImpl.Dispatcher fContentDispatcher
Content dispatcher.
-
fElementQName
protected final org.apache.xerces.xni.QName fElementQName
Element QName.
-
fAttributeQName
protected final org.apache.xerces.xni.QName fAttributeQName
Attribute QName.
-
fAttributes
protected final XMLAttributesImpl fAttributes
Element attributes.
-
fTempString
protected final org.apache.xerces.xni.XMLString fTempString
String.
-
fTempString2
protected final org.apache.xerces.xni.XMLString fTempString2
String.
-
-
Method Detail
-
setInputSource
public void setInputSource(org.apache.xerces.xni.parser.XMLInputSource inputSource) throws java.io.IOExceptionSets the input source.- Specified by:
setInputSourcein interfaceorg.apache.xerces.xni.parser.XMLDocumentScanner- Parameters:
inputSource- The input source.- Throws:
java.io.IOException- Thrown on i/o error.
-
scanDocument
public boolean scanDocument(boolean complete) throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans a document.- Specified by:
scanDocumentin interfaceorg.apache.xerces.xni.parser.XMLDocumentScanner- Parameters:
complete- True if the scanner should scan the document completely, pushing all events to the registered document handler. A value of false indicates that that the scanner should only scan the next portion of the document and return. A scanner instance is permitted to completely scan a document if it does not support this "pull" scanning model.- Returns:
- True if there is more to scan, false otherwise.
- Throws:
java.io.IOExceptionorg.apache.xerces.xni.XNIException
-
reset
public void reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager) throws org.apache.xerces.xni.parser.XMLConfigurationExceptionResets the component. The component can query the component manager about any features and properties that affect the operation of the component.- Specified by:
resetin interfaceorg.apache.xerces.xni.parser.XMLComponent- Overrides:
resetin classXMLScanner- Parameters:
componentManager- The component manager.- Throws:
SAXException- Thrown by component on initialization error. For example, if a feature or property is required for the operation of the component, the component manager may throw a SAXNotRecognizedException or a SAXNotSupportedException.org.apache.xerces.xni.parser.XMLConfigurationException
-
getRecognizedFeatures
public java.lang.String[] getRecognizedFeatures()
Returns a list of feature identifiers that are recognized by this component. This method may return null if no features are recognized by this component.- Specified by:
getRecognizedFeaturesin interfaceorg.apache.xerces.xni.parser.XMLComponent
-
setFeature
public void setFeature(java.lang.String featureId, boolean state) throws org.apache.xerces.xni.parser.XMLConfigurationExceptionSets the state of a feature. This method is called by the component manager any time after reset when a feature changes state.Note: Components should silently ignore features that do not affect the operation of the component.
- Specified by:
setFeaturein interfaceorg.apache.xerces.xni.parser.XMLComponent- Overrides:
setFeaturein classXMLScanner- Parameters:
featureId- The feature identifier.state- The state of the feature.- Throws:
SAXNotRecognizedException- The component should not throw this exception.SAXNotSupportedException- The component should not throw this exception.org.apache.xerces.xni.parser.XMLConfigurationException- Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.
-
getRecognizedProperties
public java.lang.String[] getRecognizedProperties()
Returns a list of property identifiers that are recognized by this component. This method may return null if no properties are recognized by this component.- Specified by:
getRecognizedPropertiesin interfaceorg.apache.xerces.xni.parser.XMLComponent
-
setProperty
public void setProperty(java.lang.String propertyId, java.lang.Object value) throws org.apache.xerces.xni.parser.XMLConfigurationExceptionSets the value of a property. This method is called by the component manager any time after reset when a property changes value.Note: Components should silently ignore properties that do not affect the operation of the component.
- Specified by:
setPropertyin interfaceorg.apache.xerces.xni.parser.XMLComponent- Overrides:
setPropertyin classXMLScanner- Parameters:
propertyId- The property identifier.value- The value of the property.- Throws:
SAXNotRecognizedException- The component should not throw this exception.SAXNotSupportedException- The component should not throw this exception.org.apache.xerces.xni.parser.XMLConfigurationException- Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.
-
getFeatureDefault
public java.lang.Boolean getFeatureDefault(java.lang.String featureId)
Returns the default state for a feature, or null if this component does not want to report a default value for this feature.- Specified by:
getFeatureDefaultin interfaceorg.apache.xerces.xni.parser.XMLComponent- Parameters:
featureId- The feature identifier.- Since:
- Xerces 2.2.0
-
getPropertyDefault
public java.lang.Object getPropertyDefault(java.lang.String propertyId)
Returns the default state for a property, or null if this component does not want to report a default value for this property.- Specified by:
getPropertyDefaultin interfaceorg.apache.xerces.xni.parser.XMLComponent- Parameters:
propertyId- The property identifier.- Since:
- Xerces 2.2.0
-
setDocumentHandler
public void setDocumentHandler(org.apache.xerces.xni.XMLDocumentHandler documentHandler)
setDocumentHandler- Specified by:
setDocumentHandlerin interfaceorg.apache.xerces.xni.parser.XMLDocumentSource- Parameters:
documentHandler-
-
getDocumentHandler
public org.apache.xerces.xni.XMLDocumentHandler getDocumentHandler()
Returns the document handler- Specified by:
getDocumentHandlerin interfaceorg.apache.xerces.xni.parser.XMLDocumentSource
-
startEntity
public void startEntity(java.lang.String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, java.lang.String encoding, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIExceptionThis method notifies of the start of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name.- Specified by:
startEntityin interfaceXMLEntityHandler- Overrides:
startEntityin classXMLScanner- Parameters:
name- The name of the entity.identifier- The resource identifier.encoding- The auto-detected IANA encoding name of the entity stream. This value will be null in those situations where the entity encoding is not auto-detected (e.g. internal entities or a document entity that is parsed from a java.io.Reader).augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by handler to signal an error.
-
endEntity
public void endEntity(java.lang.String name, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIExceptionThis method notifies the end of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name.- Specified by:
endEntityin interfaceXMLEntityHandler- Overrides:
endEntityin classXMLScanner- Parameters:
name- The name of the entity.augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by handler to signal an error.
-
createContentDispatcher
protected XMLDocumentFragmentScannerImpl.Dispatcher createContentDispatcher()
Creates a content dispatcher.
-
scanXMLDeclOrTextDecl
protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl) throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans an XML or text declaration.[23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>' [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ") [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" ) [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>'- Parameters:
scanningTextDecl- True if a text declaration is to be scanned instead of an XML declaration.- Throws:
java.io.IOExceptionorg.apache.xerces.xni.XNIException
-
scanPIData
protected void scanPIData(java.lang.String target, org.apache.xerces.xni.XMLString data) throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans a processing data. This is needed to handle the situation where a document starts with a processing instruction whose target name starts with "xml". (e.g. xmlfoo)- Overrides:
scanPIDatain classXMLScanner- Parameters:
target- The PI targetdata- The string to fill in with the data- Throws:
java.io.IOExceptionorg.apache.xerces.xni.XNIException
-
scanComment
protected void scanComment() throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans a comment.[15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'Note: Called after scanning past '<!--'
- Throws:
java.io.IOExceptionorg.apache.xerces.xni.XNIException
-
scanStartElement
protected boolean scanStartElement() throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans a start element. This method will handle the binding of namespace information and notifying the handler of the start of the element.[44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' [40] STag ::= '<' Name (S Attribute)* S? '>'
Note: This method assumes that the leading '<' character has been consumed.
Note: This method uses the fElementQName and fAttributes variables. The contents of these variables will be destroyed. The caller should copy important information out of these variables before calling this method.
- Returns:
- True if element is empty. (i.e. It matches production [44].
- Throws:
java.io.IOExceptionorg.apache.xerces.xni.XNIException
-
scanStartElementName
protected void scanStartElementName() throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans the name of an element in a start or empty tag.- Throws:
java.io.IOExceptionorg.apache.xerces.xni.XNIException- See Also:
scanStartElement()
-
scanStartElementAfterName
protected boolean scanStartElementAfterName() throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans the remainder of a start or empty tag after the element name.- Returns:
- True if element is empty.
- Throws:
java.io.IOExceptionorg.apache.xerces.xni.XNIException- See Also:
scanStartElement()
-
scanAttribute
protected void scanAttribute(org.apache.xerces.xni.XMLAttributes attributes) throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans an attribute.[41] Attribute ::= Name Eq AttValue
Note: This method assumes that the next character on the stream is the first character of the attribute name.
Note: This method uses the fAttributeQName and fQName variables. The contents of these variables will be destroyed.
- Parameters:
attributes- The attributes list for the scanned attribute.- Throws:
java.io.IOExceptionorg.apache.xerces.xni.XNIException
-
scanContent
protected int scanContent() throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans element content.- Returns:
- Returns the next character on the stream.
- Throws:
java.io.IOExceptionorg.apache.xerces.xni.XNIException
-
scanCDATASection
protected boolean scanCDATASection(boolean complete) throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans a CDATA section.Note: This method uses the fTempString and fStringBuffer variables.
- Parameters:
complete- True if the CDATA section is to be scanned completely.- Returns:
- True if CDATA is completely scanned.
- Throws:
java.io.IOExceptionorg.apache.xerces.xni.XNIException
-
scanEndElement
protected int scanEndElement() throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans an end element.[42] ETag ::= '</' Name S? '>'
Note: This method uses the fElementQName variable. The contents of this variable will be destroyed. The caller should copy the needed information out of this variable before calling this method.
- Returns:
- The element depth.
- Throws:
java.io.IOExceptionorg.apache.xerces.xni.XNIException
-
scanCharReference
protected void scanCharReference() throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans a character reference.[66] CharRef ::= '' [0-9]+ ';' | '' [0-9a-fA-F]+ ';'
- Throws:
java.io.IOExceptionorg.apache.xerces.xni.XNIException
-
scanEntityReference
protected void scanEntityReference() throws java.io.IOException, org.apache.xerces.xni.XNIExceptionScans an entity reference.- Throws:
java.io.IOException- Thrown if i/o error occurs.org.apache.xerces.xni.XNIException- Thrown if handler throws exception upon notification.
-
handleEndElement
protected int handleEndElement(org.apache.xerces.xni.QName element, boolean isEmpty) throws org.apache.xerces.xni.XNIExceptionHandles the end element. This method will make sure that the end element name matches the current element and notify the handler about the end of the element and the end of any relevent prefix mappings.Note: This method uses the fQName variable. The contents of this variable will be destroyed.
- Parameters:
element- The element.- Returns:
- The element depth.
- Throws:
org.apache.xerces.xni.XNIException- Thrown if the handler throws a SAX exception upon notification.
-
setScannerState
protected final void setScannerState(int state)
Sets the scanner state.- Parameters:
state- The new scanner state.
-
setDispatcher
protected final void setDispatcher(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)
Sets the dispatcher.- Parameters:
dispatcher- The new dispatcher.
-
getScannerStateName
protected java.lang.String getScannerStateName(int state)
Returns the scanner state name.
-
getDispatcherName
public java.lang.String getDispatcherName(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)
Returns the dispatcher name.
-
-