|
Xerces 2.0.0.alpha | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xerces.parsers.XMLParser
Base class of all XML-related parsers.
This class sets the defaults for the following features and properties:
Field Summary | |
protected org.apache.xerces.impl.XMLEntityManager |
fEntityManager
Entity manager. |
protected org.apache.xerces.impl.XMLErrorReporter |
fErrorReporter
Error reporter. |
protected java.util.Hashtable |
fFeatures
Features. |
protected Locator |
fLocator
Locator |
protected java.util.Hashtable |
fProperties
Properties. |
protected org.apache.xerces.util.SymbolTable |
fSymbolTable
Symbol table. |
Constructor Summary | |
protected |
XMLParser()
Default Constructor. |
protected |
XMLParser(org.apache.xerces.util.SymbolTable symbolTable)
Constructor allowing the SymbolTable to be specified. |
Method Summary | |
protected void |
checkFeature(java.lang.String featureId)
Check a feature. |
protected void |
checkProperty(java.lang.String propertyId)
Check a property. |
EntityResolver |
getEntityResolver()
Return the current entity resolver. |
ErrorHandler |
getErrorHandler()
Return the current error handler. |
boolean |
getFeature(java.lang.String featureId)
Returns the state of a feature. |
java.lang.Object |
getProperty(java.lang.String propertyId)
Returns the value of a property. |
abstract void |
parse(InputSource inputSource)
parse |
void |
parse(java.lang.String systemId)
Parses the input source specified by the given system identifier. |
protected void |
reset()
reset all components before parsing |
void |
setEntityResolver(EntityResolver resolver)
Sets the resolver used to resolve external entities. |
void |
setErrorHandler(ErrorHandler 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 |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.apache.xerces.util.SymbolTable fSymbolTable
protected Locator fLocator
protected org.apache.xerces.impl.XMLEntityManager fEntityManager
protected org.apache.xerces.impl.XMLErrorReporter fErrorReporter
protected java.util.Hashtable fProperties
protected java.util.Hashtable fFeatures
Constructor Detail |
protected XMLParser()
protected XMLParser(org.apache.xerces.util.SymbolTable symbolTable)
symbolTable
- Method Detail |
public void parse(java.lang.String systemId) throws SAXException, java.io.IOException
This method is equivalent to the following:
parse(new InputSource(systemId));
source
- The input source.SAXException
- Throws exception on SAX error.java.io.IOException
- Throws exception on i/o error.public abstract void parse(InputSource inputSource) throws SAXException, java.io.IOException
inputSource
- SAXException
- java.io.IOException
- public void setEntityResolver(EntityResolver resolver)
resolver
- The new entity resolver. Passing a null value will
uninstall the currently installed resolver.public EntityResolver getEntityResolver()
setEntityResolver(org.xml.sax.EntityResolver)
public void setErrorHandler(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.
errorHandler
- The error handler.java.lang.NullPointerException
- If the handler
argument is null.getErrorHandler()
public ErrorHandler getErrorHandler()
setErrorHandler(org.xml.sax.ErrorHandler)
public void setFeature(java.lang.String featureId, boolean state) throws SAXNotRecognizedException, SAXNotSupportedException
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).SAXNotRecognizedException
- If the
requested feature is not known.SAXNotSupportedException
- If the
requested feature is known, but the requested
state is not supported.SAXException
- If there is any other
problem fulfilling the request.public void setProperty(java.lang.String propertyId, java.lang.Object value) throws SAXNotRecognizedException, SAXNotSupportedException
propertyId
- value
- public void setLocale(java.util.Locale locale) throws SAXException
locale
- The locale object to use for localization of messages.SAXException
- An exception thrown if the parser does not
support the specified locale.Parser
public boolean getFeature(java.lang.String featureId) throws SAXNotRecognizedException, SAXNotSupportedException
getFeature
in interface org.apache.xerces.xni.XMLComponentManager
featureId
- The feature identifier.SAXNotRecognizedException
- Thrown if the feature is not
recognized.SAXNotSupportedException
- Thrown if the feature is not
supported.public java.lang.Object getProperty(java.lang.String propertyId) throws SAXNotRecognizedException, SAXNotSupportedException
getProperty
in interface org.apache.xerces.xni.XMLComponentManager
propertyId
- The property identifier.SAXNotRecognizedException
- Thrown if the feature is not
recognized.SAXNotSupportedException
- Thrown if the feature is not
supported.protected void reset() throws SAXException
protected void checkFeature(java.lang.String featureId) throws SAXNotRecognizedException, SAXNotSupportedException
featureId
- The unique identifier (URI) of the feature.SAXNotRecognizedException
- If the
requested feature is not known.SAXNotSupportedException
- If the
requested feature is known, but the requested
state is not supported.SAXException
- If there is any other
problem fulfilling the request.protected void checkProperty(java.lang.String propertyId) throws SAXNotRecognizedException, SAXNotSupportedException
propertyId
- The unique identifier (URI) of the property
being set.SAXNotRecognizedException
- If the
requested property is not known.SAXNotSupportedException
- If the
requested property is known, but the requested
value is not supported.SAXException
- If there is any other
problem fulfilling the request.
|
Xerces 2.0.0.alpha | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |