|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xerces.parsers.XMLParser | +--org.apache.xerces.parsers.AbstractXMLDocumentParser | +--org.apache.xerces.parsers.AbstractSAXParser
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.
Inner Class Summary | |
protected static class |
AbstractSAXParser.AttributesProxy
|
protected static class |
AbstractSAXParser.LocatorProxy
|
Field Summary | |
protected org.xml.sax.ContentHandler |
fContentHandler
Content handler. |
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 |
fNamespacePrefixes
Namespace prefixes. |
protected boolean |
fNamespaces
Namespaces. |
protected boolean |
fNormalizeData
Expose XML Schema schema_normalize_values via DOM |
protected boolean |
fParseInProgress
True if a parse is in progress. |
protected org.apache.xerces.xni.QName |
fQName
|
protected static java.lang.String |
NAMESPACE_PREFIXES
Feature identifier: namespace prefixes. |
protected static java.lang.String |
NAMESPACES
Feature identifier: namespaces. |
protected static java.lang.String |
NORMALIZE_DATA
Expose XML Schema normalize value |
protected static java.lang.String |
SYMBOL_TABLE
Property identifier: symbol table. |
Fields inherited from class org.apache.xerces.parsers.AbstractXMLDocumentParser |
fInDTD |
Fields inherited from class org.apache.xerces.parsers.XMLParser |
ENTITY_RESOLVER, ERROR_HANDLER, fConfiguration |
Fields inherited from interface org.apache.xerces.xni.XMLDTDHandler |
CONDITIONAL_IGNORE, CONDITIONAL_INCLUDE |
Fields inherited from interface org.apache.xerces.xni.XMLDTDContentModelHandler |
OCCURS_ONE_OR_MORE, OCCURS_ZERO_OR_MORE, OCCURS_ZERO_OR_ONE, SEPARATOR_CHOICE, SEPARATOR_SEQUENCE |
Constructor Summary | |
protected |
AbstractSAXParser(org.apache.xerces.xni.parser.XMLParserConfiguration config)
Default constructor. |
Method Summary | |
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. |
void |
endParameterEntity(java.lang.String name,
org.apache.xerces.xni.Augmentations augs)
This method notifies the end of an entity. |
void |
endPrefixMapping(java.lang.String prefix,
org.apache.xerces.xni.Augmentations augs)
The end of a namespace prefix mapping. |
void |
externalEntityDecl(java.lang.String name,
org.apache.xerces.xni.XMLResourceIdentifier identifier,
org.apache.xerces.xni.Augmentations augs)
An external entity declaration. |
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.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.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.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. |
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 |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri,
org.apache.xerces.xni.Augmentations augs)
The start of a namespace prefix mapping. |
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. |
Methods inherited from class org.apache.xerces.parsers.AbstractXMLDocumentParser |
any, element, empty, emptyElement, endAttlist, endConditional, endContentModel, endGroup, ignoredCharacters, occurrence, pcdata, separator, startAttlist, startConditional, startContentModel, startDTD, startGroup, textDecl, xmlDecl |
Methods inherited from class org.apache.xerces.parsers.XMLParser |
parse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String NAMESPACES
protected static final java.lang.String NAMESPACE_PREFIXES
protected static final java.lang.String NORMALIZE_DATA
protected static final java.lang.String SYMBOL_TABLE
protected boolean fNamespaces
protected boolean fNamespacePrefixes
protected boolean fNormalizeData
protected org.xml.sax.ContentHandler fContentHandler
protected org.xml.sax.DocumentHandler fDocumentHandler
protected org.xml.sax.DTDHandler fDTDHandler
protected org.xml.sax.ext.DeclHandler fDeclHandler
protected org.xml.sax.ext.LexicalHandler fLexicalHandler
protected org.apache.xerces.xni.QName fQName
protected boolean fParseInProgress
Constructor Detail |
protected AbstractSAXParser(org.apache.xerces.xni.parser.XMLParserConfiguration config)
Method Detail |
public void startDocument(org.apache.xerces.xni.XMLLocator locator, java.lang.String encoding, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
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).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 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 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 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 startPrefixMapping(java.lang.String prefix, java.lang.String uri, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
startPrefixMapping
in class AbstractXMLDocumentParser
prefix
- The namespace prefix.uri
- The URI bound to the prefix.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 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 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 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 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 endPrefixMapping(java.lang.String prefix, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
endPrefixMapping
in class AbstractXMLDocumentParser
prefix
- The namespace prefix.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 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 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 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 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 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.Augmentations augs) throws org.apache.xerces.xni.XNIException
startExternalSubset
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 endExternalSubset(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
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 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 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 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 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 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 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 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 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 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
source
- The input source.org.xml.sax.SAXException
- Throws exception on SAX error.java.io.IOException
- Throws exception on i/o error.public void parse(org.xml.sax.InputSource inputSource) throws org.xml.sax.SAXException, java.io.IOException
parse
in interface org.xml.sax.Parser
inputSource
- org.xml.sax.SAXException
- java.io.IOException
- public void setEntityResolver(org.xml.sax.EntityResolver resolver)
setEntityResolver
in interface org.xml.sax.Parser
resolver
- The new entity resolver. Passing a null value will
uninstall the currently installed resolver.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
errorHandler
- The error handler.java.lang.NullPointerException
- If the handler
argument is null.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
dtdHandler
- The DTD handler.java.lang.NullPointerException
- If the handler
argument is null.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.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.java.lang.NullPointerException
- If the handler
argument is null.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.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.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.Object
- 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.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.getDeclHandler()
,
setProperty(java.lang.String, java.lang.Object)
protected org.xml.sax.ext.DeclHandler getDeclHandler() throws 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 handlergetLexicalHandler()
,
setProperty(java.lang.String, java.lang.Object)
protected org.xml.sax.ext.LexicalHandler getLexicalHandler() throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
setLexicalHandler(org.xml.sax.ext.LexicalHandler)
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |