net.n3.nanoxml.sax
Class SAXParser
- Parser
public class SAXParser
implements Parser
SAXParser implements the SAX Parser interface. It is the frontend to SAX
for the NanoXML parser.
$Name: RELEASE_2_2_1 $, $Revision: 1.5 $
protected void | finalize() - Cleans up the object when it's destroyed.
|
void | parse(InputSource source) - Parse an XML document.
|
void | parse(String systemId) - Parse an XML document from a system identifier (URI).
|
void | setDTDHandler(DTDHandler handler) - Sets the DTD handler.
|
void | setDocumentHandler(DocumentHandler handler) - Allows an application to register a document event 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.
|
SAXParser
public SAXParser()
Creates the SAX parser.
finalize
protected void finalize()
throws Throwable
Cleans up the object when it's destroyed.
parse
public void parse(InputSource source)
throws SAXException,
IOException
Parse an XML document.
source
- the input source
parse
public void parse(String systemId)
throws SAXException,
IOException
Parse an XML document from a system identifier (URI).
setDTDHandler
public void setDTDHandler(DTDHandler handler)
Sets the DTD handler. As the parser is non-validating, this handler is
never called.
handler
- the DTD handler
setDocumentHandler
public void setDocumentHandler(DocumentHandler handler)
Allows an application to register a document event handler.
handler
- the document handler
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
Sets the entity resolver.
resolver
- the entity resolver
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
Allow an application to register an error event handler.
handler
- the error handler
setLocale
public void setLocale(Locale locale)
throws SAXException
Sets the locale. Only locales using the language english are accepted.