Top Description Inners Fields Constructors Methods
com.sun.org.apache.xerces.internal.parsers

public abstract Class AbstractSAXParser

extends AbstractXMLDocumentParser
implements PSVIProvider, Parser, XMLReader
Class Inheritance
All Implemented Interfaces
org.xml.sax.XMLReader, org.xml.sax.Parser, com.sun.org.apache.xerces.internal.xs.PSVIProvider
Known Direct Subclasses
com.sun.org.apache.xerces.internal.parsers.SAXParser
Annotations
@SuppressWarnings:deprecation
Imports
com.sun.org.apache.xerces.internal.impl.Constants, com.sun.org.apache.xerces.internal.util.EntityResolver2Wrapper, .EntityResolverWrapper, .ErrorHandlerWrapper, .SAXMessageFormatter, .Status, .SymbolHash, .XMLSymbols, com.sun.org.apache.xerces.internal.xni.Augmentations, .NamespaceContext, .QName, .XMLAttributes, .XMLLocator, .XMLResourceIdentifier, .XMLString, .XNIException, com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException, .XMLEntityResolver, .XMLErrorHandler, .XMLInputSource, .XMLParseException, .XMLParserConfiguration, com.sun.org.apache.xerces.internal.xs.AttributePSVI, .ElementPSVI, .PSVIProvider, java.io.CharConversionException, .IOException, java.util.Locale, javax.xml.XMLConstants, jdk.xml.internal.JdkProperty, .XMLSecurityManager, org.xml.sax.AttributeList, .ContentHandler, .DTDHandler, .DocumentHandler, .EntityResolver, .ErrorHandler, .InputSource, .Parser, .SAXException, .SAXNotRecognizedException, .SAXNotSupportedException, .SAXParseException, .XMLReader, org.xml.sax.ext.Attributes2, .DeclHandler, .EntityResolver2, .LexicalHandler, .Locator2, org.xml.sax.helpers.LocatorImpl

References Deprecated

Parser is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

This is the base class of all SAX parsers. It implements both the SAX1 and SAX2 parser functionality, while the actual pipeline is defined in the parser configuration.
Authors
Arnaud Le Hors, IBM, Andy Clark, IBM

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
AbstractSAXParser.AttributesProxy

References Deprecated AttributeList is deprecated or references (maybe indirectly) at least one deprecated element.
protected class

Field Summary

Modifier and TypeField and Description
protected static final String
ALLOW_UE_AND_NOTATION_EVENTS

Feature identifier: allow notation and unparsed entity events to be sent out of order.

private static final int
protected static final String
DECLARATION_HANDLER

Property id: declaration handler.

protected static final String
DOM_NODE

Property id: DOM node.

private final AbstractSAXParser.AttributesProxy
fAttributesProxy

References Deprecated AbstractSAXParser.AttributesProxy is deprecated or references (maybe indirectly) at least one deprecated element.
private Augmentations
private char[]
protected ContentHandler
fContentHandler

Content handler.

protected SymbolHash
protected DeclHandler
fDeclHandler

Decl handler.

protected DocumentHandler
fDocumentHandler

References Deprecated DocumentHandler is deprecated or references (maybe indirectly) at least one deprecated element.
Document handler.
protected DTDHandler
fDTDHandler

DTD handler.

protected LexicalHandler
fLexicalHandler

Lexical handler.

protected boolean
fLexicalHandlerParameterEntities

Lexical handler parameter entities.

protected NamespaceContext
fNamespaceContext

Namespace context

protected boolean
fNamespacePrefixes

Namespace prefixes.

protected boolean
fNamespaces

Namespaces.

protected boolean
fParseInProgress

True if a parse is in progress.

protected QName
protected boolean
fResolveDTDURIs

Resolve DTD URIs.

protected boolean
fStandalone

Standalone document declaration.

protected boolean
fUseEntityResolver2

Use EntityResolver2.

protected String
protected boolean
fXMLNSURIs

XMLNS URIs: Namespace declarations in the http://www.w3.org/2000/xmlns/ namespace.

protected static final String
LEXICAL_HANDLER

Property id: lexical handler.

protected static final String
NAMESPACE_PREFIXES

Feature identifier: namespace prefixes.

protected static final String
NAMESPACES

Feature identifier: namespaces.

private static final String[]
RECOGNIZED_FEATURES

Recognized features.

private static final String[]
private static final String
SECURITY_MANAGER

Property id: security manager.

protected static final String
STRING_INTERNING

Feature id: string interning.

Inherited from com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser:
fDocumentSourcefDTDContentModelSourcefDTDSourcefInDTD

Constructor Summary

AccessConstructor and Description
protected
AbstractSAXParser(XMLParserConfiguration config)

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public void
attributeDecl(String
The name of the element that this attribute is associated with.
elementName
,
String
The name of the attribute.
attributeName
,
String
The attribute type. This value will be one of the following: "CDATA", "ENTITY", "ENTITIES", "ENUMERATION", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", or "NOTATION".
type
,
String[]
If the type has the value "ENUMERATION" or "NOTATION", this array holds the allowed attribute values; otherwise, this array is null.
enumeration
,
String
The attribute default type. This value will be one of the following: "#FIXED", "#IMPLIED", "#REQUIRED", or null.
defaultType
,
XMLString
The attribute default value, or null if no default value is specified.
defaultValue
,
XMLString
The attribute default value with no normalization performed, or null if no default value is specified.
nonNormalizedDefaultValue
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.attributeDecl.

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.attributeDecl.

An attribute declaration.

public void
characters(XMLString
The content.
text
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.characters.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.characters.

Character content.

public void
public void
doctypeDecl(String
The name of the root element.
rootElement
,
String
The public identifier if an external DTD or null if the external DTD is specified using SYSTEM.
publicId
,
String
The system identifier if an external DTD, null otherwise.
systemId
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.doctypeDecl.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.doctypeDecl.

Notifies of the presence of the DOCTYPE line in the document.

public void
elementDecl(String
The name of the element.
name
,
String
The element content model.
contentModel
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.elementDecl.

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.elementDecl.

An element declaration.

public void
endCDATA(Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.endCDATA.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endCDATA.

The end of a CDATA section.

public void
endDocument(Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.endDocument.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endDocument.

The end of the document.

public void
endDTD(Augmentations
Additional information that may include infoset augmentations.
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.endDTD.

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.endDTD.

The end of the DTD.

public void
endElement(QName
The name of the element.
element
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.endElement.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endElement.

The end of an element.

public void
endExternalSubset(Augmentations
Additional information that may include infoset augmentations.
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.endExternalSubset.

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.endExternalSubset.

The end of the DTD external subset.

public void
endGeneralEntity(String
The name of the entity.
name
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.endGeneralEntity.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endGeneralEntity.

This method notifies the end of an entity.

protected final void
endNamespaceMapping()

Send endPrefixMapping events

public void
endParameterEntity(String
The name of the parameter entity.
name
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.endParameterEntity.

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.endParameterEntity.

This method notifies the end of an entity.

public void
externalEntityDecl(String
The name of the entity. Parameter entity names start with '%', whereas the name of a general entity is just the entity name.
name
,
XMLResourceIdentifier
An object containing all location information pertinent to this entity.
identifier
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.externalEntityDecl.

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.externalEntityDecl.

An external entity declaration.

public AttributePSVI
getAttributePSVI(int
The attribute index.
index
)

Implements com.sun.org.apache.xerces.internal.xs.PSVIProvider.getAttributePSVI.

Provides AttributePSVI given the index of an attribute information item in the current element's attribute list.

public AttributePSVI
getAttributePSVIByName(String
The namespace name of an attribute.
uri
,
String
The local name of an attribute.
localname
)

Implements com.sun.org.apache.xerces.internal.xs.PSVIProvider.getAttributePSVIByName.

Provides AttributePSVI given the namespace name and the local name of an attribute information item in the current element's attribute list.

public ContentHandler

Returns:

The current content handler, or null if none has been registered.
getContentHandler
()

Implements org.xml.sax.XMLReader.getContentHandler.

Return the current content handler.

protected DeclHandler
getDeclHandler()

Returns the DTD declaration event handler.

public DTDHandler

Returns:

The current DTD handler, or null if none has been registered.
getDTDHandler
()

Implements org.xml.sax.XMLReader.getDTDHandler.

Return the current DTD handler.

public ElementPSVI
getElementPSVI()

Implements com.sun.org.apache.xerces.internal.xs.PSVIProvider.getElementPSVI.

Provides the post schema validation item for the current element information item.

public EntityResolver

Returns:

The current entity resolver, or null if none has been registered.
getEntityResolver
()

Implements org.xml.sax.XMLReader.getEntityResolver.

Return the current entity resolver.

public ErrorHandler

Returns:

The current error handler, or null if none has been registered.
getErrorHandler
()

Implements org.xml.sax.XMLReader.getErrorHandler.

Return the current error handler.

public boolean

Returns:

The current state of the feature.
getFeature
(String
The unique identifier (URI) of the feature being set.
featureId
)

Overrides com.sun.org.apache.xerces.internal.parsers.XMLParser.getFeature.

Implements org.xml.sax.XMLReader.getFeature.

Query the state of a feature.

protected LexicalHandler
getLexicalHandler()

Returns the lexical handler.

public Object

Returns:

The current value of the property.
getProperty
(String
The unique identifier (URI) of the property being set.
propertyId
)

Implements org.xml.sax.XMLReader.getProperty.

Query the value of a property.

public void
ignorableWhitespace(XMLString
The ignorable whitespace.
text
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.ignorableWhitespace.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.ignorableWhitespace.

Ignorable whitespace.

public void
internalEntityDecl(String
The name of the entity. Parameter entity names start with '%', whereas the name of a general entity is just the entity name.
name
,
XMLString
The value of the entity.
text
,
XMLString
The non-normalized value of the entity. This value contains the same sequence of characters that was in the internal entity declaration, without any entity references expanded.
nonNormalizedText
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.internalEntityDecl.

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.internalEntityDecl.

An internal entity declaration.

public void
notationDecl(String
The name of the notation.
name
,
XMLResourceIdentifier
An object containing all location information pertinent to this notation.
identifier
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.notationDecl.

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.notationDecl.

A notation declaration

public void
parse(String
The system identifier (URI).
systemId
)

Implements org.xml.sax.Parser.parse, org.xml.sax.XMLReader.parse.

Parses the input source specified by the given system identifier.

public void
public void
public void
public void
setContentHandler(ContentHandler
The content handler.
contentHandler
)

Implements org.xml.sax.XMLReader.setContentHandler.

Allow an application to register a content event handler.

protected void
setDeclHandler(DeclHandler
The new handler.
handler
)

Set the DTD declaration event handler.

public void
setDocumentHandler(DocumentHandler
The document handler.
documentHandler
)

Implements org.xml.sax.Parser.setDocumentHandler.

References Deprecated DocumentHandler is deprecated or references (maybe indirectly) at least one deprecated element.

Allow an application to register a document event handler.

public void
setDTDHandler(DTDHandler
The DTD handler.
dtdHandler
)

Implements org.xml.sax.Parser.setDTDHandler, org.xml.sax.XMLReader.setDTDHandler.

Allow an application to register a DTD event handler.

public void
setEntityResolver(EntityResolver
The new entity resolver. Passing a null value will uninstall the currently installed resolver.
resolver
)

Implements org.xml.sax.Parser.setEntityResolver, org.xml.sax.XMLReader.setEntityResolver.

Sets the resolver used to resolve external entities.

public void
setErrorHandler(ErrorHandler
The error handler.
errorHandler
)

Implements org.xml.sax.Parser.setErrorHandler, org.xml.sax.XMLReader.setErrorHandler.

Allow an application to register an error event handler.

public void
setFeature(String
The unique identifier (URI) of the feature.
featureId
,
boolean
The requested state of the feature (true or false).
state
)

Implements org.xml.sax.XMLReader.setFeature.

Set the state of any feature in a SAX2 parser.

protected void
setLexicalHandler(LexicalHandler
lexical event handler
handler
)

Set the lexical event handler.

public void
setLocale(Locale
The locale object to use for localization of messages.
locale
)

Implements org.xml.sax.Parser.setLocale.

Set the locale to use for messages.

public void
setProperty(String
The unique identifier (URI) of the property being set.
propertyId
,
Object
The value to which the property is being set.
value
)

Implements org.xml.sax.XMLReader.setProperty.

Set the value of any property in a SAX2 parser.

public void
startCDATA(Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.startCDATA.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startCDATA.

The start of a CDATA section.

public void
startDocument(XMLLocator
The document locator, or null if the document location cannot be reported during the parsing of this document. However, it is strongly recommended that a locator be supplied that can at least report the system identifier of the document.
locator
,
String
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).
encoding
,
NamespaceContext
The namespace context in effect at the start of this document. This object represents the current context. Implementors of this class are responsible for copying the namespace bindings from the the current context (and its parent contexts) if that information is important.
namespaceContext
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.startDocument.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startDocument.

The start of the document.

public void
startElement(QName
The name of the element.
element
,
XMLAttributes
The element attributes.
attributes
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.startElement.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startElement.

The start of an element.

public void
startExternalSubset(XMLResourceIdentifier
The resource identifier.
identifier
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.startExternalSubset.

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.startExternalSubset.

The start of the DTD external subset.

public void
startGeneralEntity(String
The name of the entity.
name
,
XMLResourceIdentifier
The resource identifier.
identifier
,
String
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 parameter entities).
encoding
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.startGeneralEntity.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startGeneralEntity.

This method notifies of the start of an entity.

protected final void
startNamespaceMapping()

Send startPrefixMapping events

public void
startParameterEntity(String
The name of the parameter entity.
name
,
XMLResourceIdentifier
The resource identifier.
identifier
,
String
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 parameter entities).
encoding
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.startParameterEntity.

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.startParameterEntity.

This method notifies of the start of parameter entity.

public void
unparsedEntityDecl(String
The name of the entity.
name
,
XMLResourceIdentifier
An object containing all location information pertinent to this entity.
identifier
,
String
The name of the notation.
notation
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.unparsedEntityDecl.

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.unparsedEntityDecl.

An unparsed entity declaration.

public void
xmlDecl(String
The XML version.
version
,
String
The IANA encoding name of the document, or null if not specified.
encoding
,
String
The standalone value, or null if not specified.
standalone
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.xmlDecl.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.xmlDecl.

Notifies of the presence of an XMLDecl line in the document.

Inherited from com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser:
anyelementemptyemptyElementendAttlistendConditionalendContentModelendGroupgetDocumentSourcegetDTDContentModelSourcegetDTDSourceignoredCharactersoccurrencepcdataseparatorsetDocumentSourcesetDTDContentModelSourcesetDTDSourcestartAttliststartConditionalstartContentModelstartDTDstartGrouptextDecl