|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xerces.util.ParserConfigurationSettings org.apache.xerces.parsers.XML11NonValidatingConfiguration
public class XML11NonValidatingConfiguration
This class is the non vlaidating parser configuration used to parse XML 1.0 and XML 1.1 documents. Xerces parser that uses this configuration is not conformant non-validating XML processor, since conformant non-validating processor is required to process "all the declarations they read in the internal DTD subset ... must use the information in those declarations to normalize attribute values, include the replacement text of internal entities, and supply default attribute values".
Constructor Summary | |
---|---|
XML11NonValidatingConfiguration()
Default constructor. |
|
XML11NonValidatingConfiguration(SymbolTable symbolTable)
Constructs a parser configuration using the specified symbol table. |
|
XML11NonValidatingConfiguration(SymbolTable symbolTable,
XMLGrammarPool grammarPool)
Constructs a parser configuration using the specified symbol table and grammar pool. |
|
XML11NonValidatingConfiguration(SymbolTable symbolTable,
XMLGrammarPool grammarPool,
XMLComponentManager parentSettings)
Constructs a parser configuration using the specified symbol table, grammar pool, and parent settings. |
Method Summary | |
---|---|
void |
cleanup()
If the application decides to terminate parsing before the xml document is fully parsed, the application should call this method to free any resource allocated during parsing. |
XMLDocumentHandler |
getDocumentHandler()
Returns the registered document handler. |
XMLDTDContentModelHandler |
getDTDContentModelHandler()
Returns the registered DTD content model handler. |
XMLDTDHandler |
getDTDHandler()
Returns the registered DTD handler. |
XMLEntityResolver |
getEntityResolver()
Return the current entity resolver. |
XMLErrorHandler |
getErrorHandler()
Return the current error handler. |
boolean |
getFeature(java.lang.String featureId)
Returns the state of a feature. |
java.util.Locale |
getLocale()
Returns the locale. |
boolean |
parse(boolean complete)
Parses the document in a pull parsing fashion. |
void |
parse(XMLInputSource source)
Parses the specified input source. |
void |
setDocumentHandler(XMLDocumentHandler documentHandler)
Sets the document handler on the last component in the pipeline to receive information about the document. |
void |
setDTDContentModelHandler(XMLDTDContentModelHandler handler)
Sets the DTD content model handler. |
void |
setDTDHandler(XMLDTDHandler dtdHandler)
Sets the DTD handler. |
void |
setEntityResolver(XMLEntityResolver resolver)
Sets the resolver used to resolve external entities. |
void |
setErrorHandler(XMLErrorHandler errorHandler)
Allow an application to register an error event handler. |
void |
setFeature(java.lang.String featureId,
boolean state)
Set the state of a feature. |
void |
setInputSource(XMLInputSource inputSource)
Sets the input source for the document to parse. |
void |
setLocale(java.util.Locale locale)
Set the locale to use for messages. |
void |
setProperty(java.lang.String propertyId,
java.lang.Object value)
setProperty |
Methods inherited from class org.apache.xerces.util.ParserConfigurationSettings |
---|
addRecognizedFeatures, addRecognizedProperties, getProperty |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.xerces.xni.parser.XMLParserConfiguration |
---|
addRecognizedFeatures, addRecognizedProperties, getProperty |
Constructor Detail |
---|
public XML11NonValidatingConfiguration()
public XML11NonValidatingConfiguration(SymbolTable symbolTable)
symbolTable
- The symbol table to use.public XML11NonValidatingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool)
REVISIT: Grammar pool will be updated when the new validation engine is implemented.
symbolTable
- The symbol table to use.grammarPool
- The grammar pool to use.public XML11NonValidatingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings)
REVISIT: Grammar pool will be updated when the new validation engine is implemented.
symbolTable
- The symbol table to use.grammarPool
- The grammar pool to use.parentSettings
- The parent settings.Method Detail |
---|
public void setInputSource(XMLInputSource inputSource) throws XMLConfigurationException, java.io.IOException
setInputSource
in interface XMLPullParserConfiguration
inputSource
- The document's input source.
XMLConfigurationException
- Thrown if there is a
configuration error when initializing the
parser.
java.io.IOException
- Thrown on I/O error.parse(boolean)
public void setLocale(java.util.Locale locale) throws XNIException
setLocale
in interface XMLParserConfiguration
locale
- The locale object to use for localization of messages.
XNIException
- Thrown if the parser does not support the
specified locale.public void setDocumentHandler(XMLDocumentHandler documentHandler)
setDocumentHandler
in interface XMLParserConfiguration
documentHandler
- The document handler.public XMLDocumentHandler getDocumentHandler()
getDocumentHandler
in interface XMLParserConfiguration
public void setDTDHandler(XMLDTDHandler dtdHandler)
setDTDHandler
in interface XMLParserConfiguration
dtdHandler
- The DTD handler.public XMLDTDHandler getDTDHandler()
getDTDHandler
in interface XMLParserConfiguration
public void setDTDContentModelHandler(XMLDTDContentModelHandler handler)
setDTDContentModelHandler
in interface XMLParserConfiguration
handler
- The DTD content model handler.public XMLDTDContentModelHandler getDTDContentModelHandler()
getDTDContentModelHandler
in interface XMLParserConfiguration
public void setEntityResolver(XMLEntityResolver resolver)
setEntityResolver
in interface XMLParserConfiguration
resolver
- The new entity resolver. Passing a null value will
uninstall the currently installed resolver.public XMLEntityResolver getEntityResolver()
getEntityResolver
in interface XMLParserConfiguration
setEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver)
public void setErrorHandler(XMLErrorHandler 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 XMLParserConfiguration
errorHandler
- The error handler.
java.lang.NullPointerException
- If the handler
argument is null.getErrorHandler()
public XMLErrorHandler getErrorHandler()
getErrorHandler
in interface XMLParserConfiguration
setErrorHandler(org.apache.xerces.xni.parser.XMLErrorHandler)
public void cleanup()
cleanup
in interface XMLPullParserConfiguration
public void parse(XMLInputSource source) throws XNIException, java.io.IOException
parse
in interface XMLParserConfiguration
source
- The input source.
XNIException
- Throws exception on XNI error.
java.io.IOException
- Throws exception on i/o error.public boolean parse(boolean complete) throws XNIException, java.io.IOException
XMLPullParserConfiguration
parse
in interface XMLPullParserConfiguration
complete
- True if the pull parser should parse the
remaining document completely.
XNIException
- Any XNI exception, possibly wrapping
another exception.
java.io.IOException
- An IO exception from the parser, possibly
from a byte stream or character stream
supplied by the parser.XMLPullParserConfiguration.setInputSource(org.apache.xerces.xni.parser.XMLInputSource)
public boolean getFeature(java.lang.String featureId) throws XMLConfigurationException
getFeature
in interface XMLComponentManager
getFeature
in interface XMLParserConfiguration
getFeature
in class ParserConfigurationSettings
featureId
- The feature identifier.
XMLConfigurationException
- Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.public void setFeature(java.lang.String featureId, boolean state) throws XMLConfigurationException
setFeature
in interface XMLParserConfiguration
setFeature
in class ParserConfigurationSettings
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).
XMLConfigurationException
- If the
requested feature is not known.public void setProperty(java.lang.String propertyId, java.lang.Object value) throws XMLConfigurationException
setProperty
in interface XMLParserConfiguration
setProperty
in class ParserConfigurationSettings
propertyId
- value
-
XMLConfigurationException
- Thrown if there is a configuration
error.public java.util.Locale getLocale()
getLocale
in interface XMLParserConfiguration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |