This is the main Xerces DOM parser class. It uses the abstract DOM
parser with a document scanner, a dtd scanner, and a validator, as
well as a grammar pool.
getEntityResolver
public org.xml.sax.EntityResolver getEntityResolver()
Return the current entity resolver.
- The current entity resolver, or null if none
has been registered.
getErrorHandler
public org.xml.sax.ErrorHandler getErrorHandler()
Return the current error handler.
- The current error handler, or null if none
has been registered.
getFeature
public boolean getFeature(String featureId)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
Query the state of a feature.
Query the current state of any feature in a SAX2 parser. The
parser might not recognize the feature.
featureId
- The unique identifier (URI) of the feature
being set.
- The current state of the feature.
org.xml.sax.SAXNotRecognizedException
- If the
requested feature is not known.org.xml.sax.SAXNotSupportedException
- If the
requested feature is known but not supported.
getProperty
public Object getProperty(String propertyId)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
Query the value of a property.
Return the current value of a property in a SAX2 parser.
The parser might not recognize the property.
propertyId
- The unique identifier (URI) of the property
being set.
- The current value of the property.
org.xml.sax.SAXNotRecognizedException
- If the
requested property is not known.org.xml.sax.SAXNotSupportedException
- If the
requested property is known but not supported.
getXMLParserConfiguration
public org.apache.xerces.xni.parser.XMLParserConfiguration getXMLParserConfiguration()
Returns this parser's XMLParserConfiguration.
parse
public void parse(String systemId)
throws org.xml.sax.SAXException,
IOException
Parses the input source specified by the given system identifier.
This method is equivalent to the following:
parse(new InputSource(systemId));
systemId
- The system identifier (URI).
org.xml.sax.SAXException
- Throws exception on SAX error.
parse
public void parse(org.xml.sax.InputSource inputSource)
throws org.xml.sax.SAXException,
IOException
parse
org.xml.sax.SAXException
-
setEntityResolver
public void setEntityResolver(org.xml.sax.EntityResolver resolver)
Sets the resolver used to resolve external entities. The EntityResolver
interface supports resolution of public and system identifiers.
resolver
- The new entity resolver. Passing a null value will
uninstall the currently installed resolver.
setErrorHandler
public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
Allow an application to register an error event handler.
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.
setFeature
public void setFeature(String featureId,
boolean state)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
Set the state of any feature in a SAX2 parser. The parser
might not recognize the feature, and if it does recognize
it, it might not be able to fulfill the request.
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.
setProperty
public void setProperty(String propertyId,
Object value)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
Set the value of any property in a SAX2 parser. The parser
might not recognize the property, and if it does recognize
it, it might not support the requested value.
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.