public abstract class AbstractSAXParser extends AbstractXMLDocumentParser implements org.apache.xerces.xs.PSVIProvider, org.xml.sax.Parser, org.xml.sax.XMLReader
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractSAXParser.AttributesProxy |
protected static class |
AbstractSAXParser.LocatorProxy |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ALLOW_UE_AND_NOTATION_EVENTS
Feature identifier: allow notation and unparsed entity events to be sent out of order.
|
protected static java.lang.String |
DECLARATION_HANDLER
Property id: declaration handler.
|
protected static java.lang.String |
DOM_NODE
Property id: DOM node.
|
protected org.xml.sax.ContentHandler |
fContentHandler
Content handler.
|
protected SymbolHash |
fDeclaredAttrs |
protected org.xml.sax.ext.DeclHandler |
fDeclHandler
Decl handler.
|
protected org.xml.sax.DocumentHandler |
fDocumentHandler
Document handler.
|
protected org.xml.sax.DTDHandler |
fDTDHandler
DTD handler.
|
protected org.xml.sax.ext.LexicalHandler |
fLexicalHandler
Lexical handler.
|
protected boolean |
fLexicalHandlerParameterEntities
Lexical handler parameter entities.
|
protected org.apache.xerces.xni.NamespaceContext |
fNamespaceContext
Namespace context
|
protected boolean |
fNamespacePrefixes
Namespace prefixes.
|
protected boolean |
fNamespaces
Namespaces.
|
protected boolean |
fParseInProgress
True if a parse is in progress.
|
protected org.apache.xerces.xni.QName |
fQName |
protected boolean |
fResolveDTDURIs
Resolve DTD URIs.
|
protected boolean |
fStandalone
Standalone document declaration.
|
protected boolean |
fUseEntityResolver2
Use EntityResolver2.
|
protected java.lang.String |
fVersion |
protected boolean |
fXMLNSURIs
XMLNS URIs: Namespace declarations in the
http://www.w3.org/2000/xmlns/ namespace.
|
protected static java.lang.String |
LEXICAL_HANDLER
Property id: lexical handler.
|
protected static java.lang.String |
NAMESPACES
Feature identifier: namespaces.
|
protected static java.lang.String |
STRING_INTERNING
Feature id: string interning.
|
fDocumentSource, fDTDContentModelSource, fDTDSource, fInDTD
ENTITY_RESOLVER, ERROR_HANDLER, fConfiguration
Modifier | Constructor and Description |
---|---|
protected |
AbstractSAXParser(org.apache.xerces.xni.parser.XMLParserConfiguration config)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
attributeDecl(java.lang.String elementName,
java.lang.String attributeName,
java.lang.String type,
java.lang.String[] enumeration,
java.lang.String defaultType,
org.apache.xerces.xni.XMLString defaultValue,
org.apache.xerces.xni.XMLString nonNormalizedDefaultValue,
org.apache.xerces.xni.Augmentations augs)
An attribute declaration.
|
void |
characters(org.apache.xerces.xni.XMLString text,
org.apache.xerces.xni.Augmentations augs)
Character content.
|
void |
comment(org.apache.xerces.xni.XMLString text,
org.apache.xerces.xni.Augmentations augs)
A comment.
|
void |
doctypeDecl(java.lang.String rootElement,
java.lang.String publicId,
java.lang.String systemId,
org.apache.xerces.xni.Augmentations augs)
Notifies of the presence of the DOCTYPE line in the document.
|
void |
elementDecl(java.lang.String name,
java.lang.String contentModel,
org.apache.xerces.xni.Augmentations augs)
An element declaration.
|
void |
endCDATA(org.apache.xerces.xni.Augmentations augs)
The end of a CDATA section.
|
void |
endDocument(org.apache.xerces.xni.Augmentations augs)
The end of the document.
|
void |
endDTD(org.apache.xerces.xni.Augmentations augs)
The end of the DTD.
|
void |
endElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.Augmentations augs)
The end of an element.
|
void |
endExternalSubset(org.apache.xerces.xni.Augmentations augs)
The end of the DTD external subset.
|
void |
endGeneralEntity(java.lang.String name,
org.apache.xerces.xni.Augmentations augs)
This method notifies the end of an entity.
|
protected void |
endNamespaceMapping()
Send endPrefixMapping events
|
void |
endParameterEntity(java.lang.String name,
org.apache.xerces.xni.Augmentations augs)
This method notifies the end of an entity.
|
void |
externalEntityDecl(java.lang.String name,
org.apache.xerces.xni.XMLResourceIdentifier identifier,
org.apache.xerces.xni.Augmentations augs)
An external entity declaration.
|
org.apache.xerces.xs.AttributePSVI |
getAttributePSVI(int index)
Provides
AttributePSVI given the index of an attribute
information item in the current element's attribute list. |
org.apache.xerces.xs.AttributePSVI |
getAttributePSVIByName(java.lang.String uri,
java.lang.String localname)
Provides
AttributePSVI given the namespace name and the
local name of an attribute information item in the current element's
attribute list. |
org.xml.sax.ContentHandler |
getContentHandler()
Return the current content handler.
|
protected org.xml.sax.ext.DeclHandler |
getDeclHandler()
Returns the DTD declaration event handler.
|
org.xml.sax.DTDHandler |
getDTDHandler()
Return the current DTD handler.
|
org.apache.xerces.xs.ElementPSVI |
getElementPSVI()
Provides the post schema validation item for the current element
information item.
|
org.xml.sax.EntityResolver |
getEntityResolver()
Return the current entity resolver.
|
org.xml.sax.ErrorHandler |
getErrorHandler()
Return the current error handler.
|
boolean |
getFeature(java.lang.String featureId)
Query the state of a feature.
|
protected org.xml.sax.ext.LexicalHandler |
getLexicalHandler()
Returns the lexical handler.
|
java.lang.Object |
getProperty(java.lang.String propertyId)
Query the value of a property.
|
void |
ignorableWhitespace(org.apache.xerces.xni.XMLString text,
org.apache.xerces.xni.Augmentations augs)
Ignorable whitespace.
|
void |
internalEntityDecl(java.lang.String name,
org.apache.xerces.xni.XMLString text,
org.apache.xerces.xni.XMLString nonNormalizedText,
org.apache.xerces.xni.Augmentations augs)
An internal entity declaration.
|
void |
notationDecl(java.lang.String name,
org.apache.xerces.xni.XMLResourceIdentifier identifier,
org.apache.xerces.xni.Augmentations augs)
A notation declaration
|
void |
parse(org.xml.sax.InputSource inputSource)
parse
|
void |
parse(java.lang.String systemId)
Parses the input source specified by the given system identifier.
|
void |
processingInstruction(java.lang.String target,
org.apache.xerces.xni.XMLString data,
org.apache.xerces.xni.Augmentations augs)
A processing instruction.
|
void |
reset()
Reset all components before parsing.
|
void |
setContentHandler(org.xml.sax.ContentHandler contentHandler)
Allow an application to register a content event handler.
|
protected void |
setDeclHandler(org.xml.sax.ext.DeclHandler handler)
Set the DTD declaration event handler.
|
void |
setDocumentHandler(org.xml.sax.DocumentHandler documentHandler)
Allow an application to register a document event handler.
|
void |
setDTDHandler(org.xml.sax.DTDHandler dtdHandler)
Allow an application to register a DTD event handler.
|
void |
setEntityResolver(org.xml.sax.EntityResolver resolver)
Sets the resolver used to resolve external entities.
|
void |
setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
Allow an application to register an error event handler.
|
void |
setFeature(java.lang.String featureId,
boolean state)
Set the state of any feature in a SAX2 parser.
|
protected void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
Set the lexical event handler.
|
void |
setLocale(java.util.Locale locale)
Set the locale to use for messages.
|
void |
setProperty(java.lang.String propertyId,
java.lang.Object value)
Set the value of any property in a SAX2 parser.
|
void |
startCDATA(org.apache.xerces.xni.Augmentations augs)
The start of a CDATA section.
|
void |
startDocument(org.apache.xerces.xni.XMLLocator locator,
java.lang.String encoding,
org.apache.xerces.xni.NamespaceContext namespaceContext,
org.apache.xerces.xni.Augmentations augs)
The start of the document.
|
void |
startElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attributes,
org.apache.xerces.xni.Augmentations augs)
The start of an element.
|
void |
startExternalSubset(org.apache.xerces.xni.XMLResourceIdentifier identifier,
org.apache.xerces.xni.Augmentations augs)
The start of the DTD external subset.
|
void |
startGeneralEntity(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.
|
protected void |
startNamespaceMapping()
Send startPrefixMapping events
|
void |
startParameterEntity(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 parameter entity.
|
void |
unparsedEntityDecl(java.lang.String name,
org.apache.xerces.xni.XMLResourceIdentifier identifier,
java.lang.String notation,
org.apache.xerces.xni.Augmentations augs)
An unparsed entity declaration.
|
void |
xmlDecl(java.lang.String version,
java.lang.String encoding,
java.lang.String standalone,
org.apache.xerces.xni.Augmentations augs)
Notifies of the presence of an XMLDecl line in the document.
|
any, element, empty, emptyElement, endAttlist, endConditional, endContentModel, endGroup, getDocumentSource, getDTDContentModelSource, getDTDSource, ignoredCharacters, occurrence, pcdata, separator, setDocumentSource, setDTDContentModelSource, setDTDSource, startAttlist, startConditional, startContentModel, startDTD, startGroup, textDecl
protected static final java.lang.String NAMESPACES
protected static final java.lang.String STRING_INTERNING
protected static final java.lang.String ALLOW_UE_AND_NOTATION_EVENTS
protected static final java.lang.String LEXICAL_HANDLER
protected static final java.lang.String DECLARATION_HANDLER
protected static final java.lang.String DOM_NODE
protected boolean fNamespaces
protected boolean fNamespacePrefixes
protected boolean fLexicalHandlerParameterEntities
protected boolean fStandalone
protected boolean fResolveDTDURIs
protected boolean fUseEntityResolver2
protected boolean fXMLNSURIs
protected org.xml.sax.ContentHandler fContentHandler
protected org.xml.sax.DocumentHandler fDocumentHandler
protected org.apache.xerces.xni.NamespaceContext fNamespaceContext
protected org.xml.sax.DTDHandler fDTDHandler
protected org.xml.sax.ext.DeclHandler fDeclHandler
protected org.xml.sax.ext.LexicalHandler fLexicalHandler
protected final org.apache.xerces.xni.QName fQName
protected boolean fParseInProgress
protected java.lang.String fVersion
protected SymbolHash fDeclaredAttrs
protected AbstractSAXParser(org.apache.xerces.xni.parser.XMLParserConfiguration config)
public void startDocument(org.apache.xerces.xni.XMLLocator locator, java.lang.String encoding, org.apache.xerces.xni.NamespaceContext namespaceContext, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
startDocument
in interface org.apache.xerces.xni.XMLDocumentHandler
startDocument
in class AbstractXMLDocumentParser
locator
- 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.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).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.augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void xmlDecl(java.lang.String version, java.lang.String encoding, java.lang.String standalone, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
xmlDecl
in interface org.apache.xerces.xni.XMLDocumentHandler
xmlDecl
in class AbstractXMLDocumentParser
version
- The XML version.encoding
- The IANA encoding name of the document, or null if
not specified.standalone
- The standalone value, or null if not specified.augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void doctypeDecl(java.lang.String rootElement, java.lang.String publicId, java.lang.String systemId, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
doctypeDecl
in interface org.apache.xerces.xni.XMLDocumentHandler
doctypeDecl
in class AbstractXMLDocumentParser
rootElement
- The name of the root element.publicId
- The public identifier if an external DTD or null
if the external DTD is specified using SYSTEM.systemId
- The system identifier if an external DTD, null
otherwise.augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void startGeneralEntity(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.XNIException
Note: Since the document is an entity, the handler will be notified of the start of the document entity by calling the startEntity method with the entity name "[xml]" before calling the startDocument method. When exposing entity boundaries through the SAX API, the document entity is never reported, however.
Note: This method is not called for entity references appearing as part of attribute values.
startGeneralEntity
in interface org.apache.xerces.xni.XMLDocumentHandler
startGeneralEntity
in class AbstractXMLDocumentParser
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 parameter entities).augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void endGeneralEntity(java.lang.String name, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
Note: Since the document is an entity, the handler will be notified of the end of the document entity by calling the endEntity method with the entity name "[xml]" after calling the endDocument method. When exposing entity boundaries through the SAX API, the document entity is never reported, however.
Note: This method is not called for entity references appearing as part of attribute values.
endGeneralEntity
in interface org.apache.xerces.xni.XMLDocumentHandler
endGeneralEntity
in class AbstractXMLDocumentParser
name
- The name of the entity.augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void startElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
startElement
in interface org.apache.xerces.xni.XMLDocumentHandler
startElement
in class AbstractXMLDocumentParser
element
- The name of the element.attributes
- The element attributes.augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void characters(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
characters
in interface org.apache.xerces.xni.XMLDocumentHandler
characters
in class AbstractXMLDocumentParser
text
- The content.augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void ignorableWhitespace(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
ignorableWhitespace
in interface org.apache.xerces.xni.XMLDocumentHandler
ignorableWhitespace
in class AbstractXMLDocumentParser
text
- The ignorable whitespace.augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void endElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
endElement
in interface org.apache.xerces.xni.XMLDocumentHandler
endElement
in class AbstractXMLDocumentParser
element
- The name of the element.augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void startCDATA(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
startCDATA
in interface org.apache.xerces.xni.XMLDocumentHandler
startCDATA
in class AbstractXMLDocumentParser
augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void endCDATA(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
endCDATA
in interface org.apache.xerces.xni.XMLDocumentHandler
endCDATA
in class AbstractXMLDocumentParser
augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void comment(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
comment
in interface org.apache.xerces.xni.XMLDocumentHandler
comment
in interface org.apache.xerces.xni.XMLDTDHandler
comment
in class AbstractXMLDocumentParser
text
- The text in the comment.augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by application to signal an error.public void processingInstruction(java.lang.String target, org.apache.xerces.xni.XMLString data, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
Typically, a processing instruction's data will contain a series of pseudo-attributes. These pseudo-attributes follow the form of element attributes but are not parsed or presented to the application as anything other than text. The application is responsible for parsing the data.
processingInstruction
in interface org.apache.xerces.xni.XMLDocumentHandler
processingInstruction
in interface org.apache.xerces.xni.XMLDTDHandler
processingInstruction
in class AbstractXMLDocumentParser
target
- The target.data
- The data or null if none specified.augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void endDocument(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
endDocument
in interface org.apache.xerces.xni.XMLDocumentHandler
endDocument
in class AbstractXMLDocumentParser
augs
- Additional information that may include infoset augmentationsorg.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void startExternalSubset(org.apache.xerces.xni.XMLResourceIdentifier identifier, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
startExternalSubset
in interface org.apache.xerces.xni.XMLDTDHandler
startExternalSubset
in class AbstractXMLDocumentParser
augs
- Additional information that may include infoset
augmentations.identifier
- The resource identifier.org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void endExternalSubset(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
endExternalSubset
in interface org.apache.xerces.xni.XMLDTDHandler
endExternalSubset
in class AbstractXMLDocumentParser
augs
- Additional information that may include infoset
augmentations.org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void startParameterEntity(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.XNIException
Note: Since the document is an entity, the handler will be notified of the start of the document entity by calling the startEntity method with the entity name "[xml]" before calling the startDocument method. When exposing entity boundaries through the SAX API, the document entity is never reported, however.
Note: This method is not called for entity references appearing as part of attribute values.
startParameterEntity
in interface org.apache.xerces.xni.XMLDTDHandler
startParameterEntity
in class AbstractXMLDocumentParser
name
- The name of the parameter 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 parameter entities).augs
- Additional information that may include infoset
augmentations.org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void endParameterEntity(java.lang.String name, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
Note: Since the document is an entity, the handler will be notified of the end of the document entity by calling the endEntity method with the entity name "[xml]" after calling the endDocument method. When exposing entity boundaries through the SAX API, the document entity is never reported, however.
Note: This method is not called for entity references appearing as part of attribute values.
endParameterEntity
in interface org.apache.xerces.xni.XMLDTDHandler
endParameterEntity
in class AbstractXMLDocumentParser
name
- The name of the parameter entity.augs
- Additional information that may include infoset
augmentations.org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void elementDecl(java.lang.String name, java.lang.String contentModel, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
elementDecl
in interface org.apache.xerces.xni.XMLDTDHandler
elementDecl
in class AbstractXMLDocumentParser
name
- The name of the element.contentModel
- The element content model.augs
- Additional information that may include infoset
augmentations.org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void attributeDecl(java.lang.String elementName, java.lang.String attributeName, java.lang.String type, java.lang.String[] enumeration, java.lang.String defaultType, org.apache.xerces.xni.XMLString defaultValue, org.apache.xerces.xni.XMLString nonNormalizedDefaultValue, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
attributeDecl
in interface org.apache.xerces.xni.XMLDTDHandler
attributeDecl
in class AbstractXMLDocumentParser
elementName
- The name of the element that this attribute
is associated with.attributeName
- The name of the attribute.type
- The attribute type. This value will be one of
the following: "CDATA", "ENTITY", "ENTITIES",
"ENUMERATION", "ID", "IDREF", "IDREFS",
"NMTOKEN", "NMTOKENS", or "NOTATION".enumeration
- If the type has the value "ENUMERATION" or
"NOTATION", this array holds the allowed attribute
values; otherwise, this array is null.defaultType
- The attribute default type. This value will be
one of the following: "#FIXED", "#IMPLIED",
"#REQUIRED", or null.defaultValue
- The attribute default value, or null if no
default value is specified.nonNormalizedDefaultValue
- The attribute default value with no normalization
performed, or null if no default value is specified.augs
- Additional information that may include infoset
augmentations.org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void internalEntityDecl(java.lang.String name, org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.XMLString nonNormalizedText, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
internalEntityDecl
in interface org.apache.xerces.xni.XMLDTDHandler
internalEntityDecl
in class AbstractXMLDocumentParser
name
- The name of the entity. Parameter entity names start with
'%', whereas the name of a general entity is just the
entity name.text
- The value of the entity.nonNormalizedText
- 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.augs
- Additional information that may include infoset
augmentations.org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void externalEntityDecl(java.lang.String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
externalEntityDecl
in interface org.apache.xerces.xni.XMLDTDHandler
externalEntityDecl
in class AbstractXMLDocumentParser
name
- The name of the entity. Parameter entity names start
with '%', whereas the name of a general entity is just
the entity name.identifier
- An object containing all location information
pertinent to this entity.augs
- Additional information that may include infoset
augmentations.org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void unparsedEntityDecl(java.lang.String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, java.lang.String notation, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
unparsedEntityDecl
in interface org.apache.xerces.xni.XMLDTDHandler
unparsedEntityDecl
in class AbstractXMLDocumentParser
name
- The name of the entity.identifier
- An object containing all location information
pertinent to this entity.notation
- The name of the notation.augs
- Additional information that may include infoset
augmentations.org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void notationDecl(java.lang.String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
notationDecl
in interface org.apache.xerces.xni.XMLDTDHandler
notationDecl
in class AbstractXMLDocumentParser
name
- The name of the notation.identifier
- An object containing all location information
pertinent to this notation.augs
- Additional information that may include infoset
augmentations.org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void endDTD(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
endDTD
in interface org.apache.xerces.xni.XMLDTDHandler
endDTD
in class AbstractXMLDocumentParser
augs
- Additional information that may include infoset
augmentations.org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.public void parse(java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
This method is equivalent to the following:
parse(new InputSource(systemId));
parse
in interface org.xml.sax.Parser
parse
in interface org.xml.sax.XMLReader
systemId
- The system identifier (URI).org.xml.sax.SAXException
- Throws exception on SAX error.java.io.IOException
- Throws exception on i/o error.Parser.parse(org.xml.sax.InputSource)
public void parse(org.xml.sax.InputSource inputSource) throws org.xml.sax.SAXException, java.io.IOException
parse
in interface org.xml.sax.Parser
parse
in interface org.xml.sax.XMLReader
inputSource
- org.xml.sax.SAXException
java.io.IOException
InputSource
,
Parser.parse(java.lang.String)
,
Parser.setEntityResolver(org.xml.sax.EntityResolver)
,
Parser.setDTDHandler(org.xml.sax.DTDHandler)
,
Parser.setDocumentHandler(org.xml.sax.DocumentHandler)
,
Parser.setErrorHandler(org.xml.sax.ErrorHandler)
public void setEntityResolver(org.xml.sax.EntityResolver resolver)
setEntityResolver
in interface org.xml.sax.Parser
setEntityResolver
in interface org.xml.sax.XMLReader
resolver
- The new entity resolver. Passing a null value will
uninstall the currently installed resolver.EntityResolver
,
HandlerBase
public org.xml.sax.EntityResolver getEntityResolver()
getEntityResolver
in interface org.xml.sax.XMLReader
setEntityResolver(org.xml.sax.EntityResolver)
public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue. It is highly recommended that all SAX applications implement an error handler to avoid unexpected bugs.
Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
setErrorHandler
in interface org.xml.sax.Parser
setErrorHandler
in interface org.xml.sax.XMLReader
errorHandler
- The error handler.getErrorHandler()
public org.xml.sax.ErrorHandler getErrorHandler()
getErrorHandler
in interface org.xml.sax.XMLReader
setErrorHandler(org.xml.sax.ErrorHandler)
public void setLocale(java.util.Locale locale) throws org.xml.sax.SAXException
setLocale
in interface org.xml.sax.Parser
locale
- The locale object to use for localization of messages.org.xml.sax.SAXException
- An exception thrown if the parser does not
support the specified locale.Parser
public void setDTDHandler(org.xml.sax.DTDHandler dtdHandler)
If the application does not register a DTD handler, all DTD events reported by the SAX parser will be silently ignored.
Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
setDTDHandler
in interface org.xml.sax.Parser
setDTDHandler
in interface org.xml.sax.XMLReader
dtdHandler
- The DTD handler.getDTDHandler()
public void setDocumentHandler(org.xml.sax.DocumentHandler documentHandler)
If the application does not register a document handler, all document events reported by the SAX parser will be silently ignored (this is the default behaviour implemented by HandlerBase).
Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
setDocumentHandler
in interface org.xml.sax.Parser
documentHandler
- The document handler.DocumentHandler
,
HandlerBase
public void setContentHandler(org.xml.sax.ContentHandler contentHandler)
If the application does not register a content handler, all content events reported by the SAX parser will be silently ignored.
Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
setContentHandler
in interface org.xml.sax.XMLReader
contentHandler
- The content handler.getContentHandler()
public org.xml.sax.ContentHandler getContentHandler()
getContentHandler
in interface org.xml.sax.XMLReader
setContentHandler(org.xml.sax.ContentHandler)
public org.xml.sax.DTDHandler getDTDHandler()
getDTDHandler
in interface org.xml.sax.XMLReader
setDTDHandler(org.xml.sax.DTDHandler)
public void setFeature(java.lang.String featureId, boolean state) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
setFeature
in interface org.xml.sax.XMLReader
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).org.xml.sax.SAXNotRecognizedException
- If the
requested feature is not known.org.xml.sax.SAXNotSupportedException
- If the
requested feature is known, but the requested
state is not supported.XMLReader.getFeature(java.lang.String)
public boolean getFeature(java.lang.String featureId) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
getFeature
in interface org.xml.sax.XMLReader
featureId
- The unique identifier (URI) of the feature
being set.org.xml.sax.SAXNotRecognizedException
- If the
requested feature is not known.org.xml.sax.SAXNotSupportedException
- If the
requested feature is known but not supported.XMLReader.setFeature(java.lang.String, boolean)
public void setProperty(java.lang.String propertyId, java.lang.Object value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
setProperty
in interface org.xml.sax.XMLReader
propertyId
- The unique identifier (URI) of the property
being set.value
- The value to which the property is being set.org.xml.sax.SAXNotRecognizedException
- If the
requested property is not known.org.xml.sax.SAXNotSupportedException
- If the
requested property is known, but the requested
value is not supported.public java.lang.Object getProperty(java.lang.String propertyId) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
getProperty
in interface org.xml.sax.XMLReader
propertyId
- The unique identifier (URI) of the property
being set.org.xml.sax.SAXNotRecognizedException
- If the
requested property is not known.org.xml.sax.SAXNotSupportedException
- If the
requested property is known but not supported.XMLReader.setProperty(java.lang.String, java.lang.Object)
protected void setDeclHandler(org.xml.sax.ext.DeclHandler handler) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
This method is the equivalent to the property:
http://xml.org/sax/properties/declaration-handler
handler
- The new handler.org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
getDeclHandler()
,
setProperty(java.lang.String, java.lang.Object)
protected org.xml.sax.ext.DeclHandler getDeclHandler() throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
setDeclHandler(org.xml.sax.ext.DeclHandler)
protected void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
This method is the equivalent to the property:
http://xml.org/sax/properties/lexical-handler
handler
- lexical event handlerorg.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
getLexicalHandler()
,
setProperty(java.lang.String, java.lang.Object)
protected org.xml.sax.ext.LexicalHandler getLexicalHandler() throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
setLexicalHandler(org.xml.sax.ext.LexicalHandler)
protected final void startNamespaceMapping() throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected final void endNamespaceMapping() throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void reset() throws org.apache.xerces.xni.XNIException
reset
in class AbstractXMLDocumentParser
org.apache.xerces.xni.XNIException
- Thrown if an error occurs during initialization.public org.apache.xerces.xs.ElementPSVI getElementPSVI()
org.apache.xerces.xs.PSVIProvider
startElement
or
endElement
call. If the method is called outside of the
specified scope, the return value is undefined.getElementPSVI
in interface org.apache.xerces.xs.PSVIProvider
public org.apache.xerces.xs.AttributePSVI getAttributePSVI(int index)
org.apache.xerces.xs.PSVIProvider
AttributePSVI
given the index of an attribute
information item in the current element's attribute list. The method
must be called by an application while in the scope of the methods
which report the start and end of an element at a point where the
attribute list is available. For example, for SAX the method must be
called while in the scope of the document handler's
startElement
call. If the method is called outside of
the specified scope, the return value is undefined.getAttributePSVI
in interface org.apache.xerces.xs.PSVIProvider
index
- The attribute index.public org.apache.xerces.xs.AttributePSVI getAttributePSVIByName(java.lang.String uri, java.lang.String localname)
org.apache.xerces.xs.PSVIProvider
AttributePSVI
given the namespace name and the
local name of an attribute information item in the current element's
attribute list. The method must be called by an application while in
the scope of the methods which report the start and end of an element
at a point where the attribute list is available. For example, for
SAX the method must be called while in the scope of the document
handler's startElement
call. If the method is called
outside of the specified scope, the return value is undefined.getAttributePSVIByName
in interface org.apache.xerces.xs.PSVIProvider
uri
- The namespace name of an attribute.localname
- The local name of an attribute.Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.