Package net.n3.nanoxml.sax
Class SAXParser
java.lang.Object
net.n3.nanoxml.sax.SAXParser
- All Implemented Interfaces:
Parser
SAXParser implements the SAX Parser interface. It is the frontend to SAX
for the NanoXML parser.
- Version:
- $Name: RELEASE_2_2_1 $, $Revision: 1.5 $
- Author:
- Marc De Scheemaecker
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfinalize()Cleans up the object when it's destroyed.voidParse an XML document from a system identifier (URI).voidparse(InputSource source) Parse an XML document.voidsetDocumentHandler(DocumentHandler handler) Allows an application to register a document event handler.voidsetDTDHandler(DTDHandler handler) Sets the DTD handler.voidsetEntityResolver(EntityResolver resolver) Sets the entity resolver.voidsetErrorHandler(ErrorHandler handler) Allow an application to register an error event handler.voidSets the locale.
-
Constructor Details
-
SAXParser
public SAXParser()Creates the SAX parser.
-
-
Method Details
-
finalize
Cleans up the object when it's destroyed. -
setLocale
Sets the locale. Only locales using the language english are accepted.- Specified by:
setLocalein interfaceParser- Parameters:
locale- the locale- Throws:
SAXException- iflocaleisnullor the associated language is not english.
-
setEntityResolver
Sets the entity resolver.- Specified by:
setEntityResolverin interfaceParser- Parameters:
resolver- the entity resolver
-
setDTDHandler
Sets the DTD handler. As the parser is non-validating, this handler is never called.- Specified by:
setDTDHandlerin interfaceParser- Parameters:
handler- the DTD handler
-
setDocumentHandler
Allows an application to register a document event handler.- Specified by:
setDocumentHandlerin interfaceParser- Parameters:
handler- the document handler
-
setErrorHandler
Allow an application to register an error event handler.- Specified by:
setErrorHandlerin interfaceParser- Parameters:
handler- the error handler
-
parse
Parse an XML document.- Specified by:
parsein interfaceParser- Parameters:
source- the input source- Throws:
SAXExceptionIOException
-
parse
Parse an XML document from a system identifier (URI).- Specified by:
parsein interfaceParser- Parameters:
systemId- the system ID- Throws:
SAXExceptionIOException
-