Constructor | Description |
---|---|
SAXParser() |
Creates the SAX parser.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
finalize() |
Cleans up the object when it's destroyed.
|
void |
parse(String systemId) |
Parse an XML document from a system identifier (URI).
|
void |
parse(InputSource source) |
Parse an XML document.
|
void |
setDocumentHandler(DocumentHandler handler) |
Allows an application to register a document event handler.
|
void |
setDTDHandler(DTDHandler handler) |
Sets the DTD handler.
|
void |
setEntityResolver(EntityResolver resolver) |
Sets the entity resolver.
|
void |
setErrorHandler(ErrorHandler handler) |
Allow an application to register an error event handler.
|
void |
setLocale(Locale locale) |
Sets the locale.
|
protected void finalize() throws Throwable
public void setLocale(Locale locale) throws SAXException
setLocale
in interface Parser
locale
- the localeSAXException
- if locale
is null
or the associated
language is not english.public void setEntityResolver(EntityResolver resolver)
setEntityResolver
in interface Parser
resolver
- the entity resolverpublic void setDTDHandler(DTDHandler handler)
setDTDHandler
in interface Parser
handler
- the DTD handlerpublic void setDocumentHandler(DocumentHandler handler)
setDocumentHandler
in interface Parser
handler
- the document handlerpublic void setErrorHandler(ErrorHandler handler)
setErrorHandler
in interface Parser
handler
- the error handlerpublic void parse(InputSource source) throws SAXException, IOException
parse
in interface Parser
source
- the input sourceSAXException
IOException
public void parse(String systemId) throws SAXException, IOException
parse
in interface Parser
systemId
- the system IDSAXException
IOException