|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.ConfigurableParserAdapter
Adapt a SAX1 parser to implement the Configurable interface. This class implements the SAX1 Parser interface and the SAX2 Configurable interface by embedding another Parser instance. If the embedded parser already implements the Configurable interface, it will be used directly; otherwise, the parser will not know about any features or properties, and will throw a SAXNotRecognizedException for all of them.
Parser
,
Configurable
Constructor Summary | |
ConfigurableParserAdapter(Parser parser)
Construct a SAX2 parser by embedding another SAX parser. |
Method Summary | |
boolean |
getFeature(java.lang.String featureId)
Get the state of a feature. |
java.lang.Object |
getProperty(java.lang.String propertyId)
Get the state of a property. |
void |
parse(InputSource source)
Parse an XML document from an InputSource. |
void |
parse(java.lang.String systemId)
Parse an XML document from a fully-qualified system ID. |
void |
setDocumentHandler(DocumentHandler handler)
Set the parser's document event handler. |
void |
setDTDHandler(DTDHandler handler)
Set the parser's DTD event handler. |
void |
setEntityResolver(EntityResolver resolver)
Set the parser's entity resolver. |
void |
setErrorHandler(ErrorHandler handler)
Set the parser's 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 for error reporting. |
void |
setProperty(java.lang.String propertyId,
java.lang.Object value)
Set the state of a property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConfigurableParserAdapter(Parser parser)
parser
- The embedded SAX parser.Method Detail |
public void setLocale(java.util.Locale locale) throws SAXException
setLocale
in interface Parser
locale
- A Java Locale object.
SAXException
- If the locale is not supported.Parser.setLocale(java.util.Locale)
public void setEntityResolver(EntityResolver resolver)
setEntityResolver
in interface Parser
resolver
- The application-provided entity resolver.Parser.setEntityResolver(org.xml.sax.EntityResolver)
public void setDTDHandler(DTDHandler handler)
setDTDHandler
in interface Parser
handler
- The application-provided DTD event handler.Parser.setDTDHandler(org.xml.sax.DTDHandler)
public void setDocumentHandler(DocumentHandler handler)
setDocumentHandler
in interface Parser
handler
- The application-provided document event handler.Parser.setDocumentHandler(org.xml.sax.DocumentHandler)
public void setErrorHandler(ErrorHandler handler)
setErrorHandler
in interface Parser
handler
- The application-provided error event handler.Parser.setErrorHandler(org.xml.sax.ErrorHandler)
public void parse(InputSource source) throws SAXException, java.io.IOException
parse
in interface Parser
source
- The InputSource for the XML document.
java.io.IOException
- An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.
SAXException
- Any SAX exception, possibly
wrapping another exception.Parser.parse(org.xml.sax.InputSource)
public void parse(java.lang.String systemId) throws SAXException, java.io.IOException
parse
in interface Parser
systemId
- The system identifier (URI) for the document.
SAXException
- Any SAX 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 application.Parser.parse(java.lang.String)
public void setFeature(java.lang.String featureId, boolean state) throws SAXException
setFeature
in interface Configurable
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).
SAXException
- If there is any other
problem fulfilling the request.Configurable.setFeature(java.lang.String, boolean)
public boolean getFeature(java.lang.String featureId) throws SAXException
getFeature
in interface Configurable
featureId
- The unique identifier (URI) of the feature
being set.
SAXException
- If there is any other
problem fulfilling the request.Configurable.getFeature(java.lang.String)
public void setProperty(java.lang.String propertyId, java.lang.Object value) throws SAXException
setProperty
in interface Configurable
propertyId
- The unique identifier (URI) of the property
being set.
SAXException
- If there is any other
problem fulfilling the request.Configurable.setProperty(java.lang.String, java.lang.Object)
public java.lang.Object getProperty(java.lang.String propertyId) throws SAXException
getProperty
in interface Configurable
propertyId
- The unique identifier (URI) of the property
being set.
SAXException
- If there is any other
problem fulfilling the request.Configurable.getProperty(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |