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.
- Author:
- Marc De Scheemaecker
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
finalize()
Cleans up the object when it's destroyed.void
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
Sets 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:
setLocale
in interfaceParser
- Parameters:
locale
- the locale- Throws:
SAXException
- iflocale
isnull
or the associated language is not english.
-
setEntityResolver
Sets the entity resolver.- Specified by:
setEntityResolver
in interfaceParser
- Parameters:
resolver
- the entity resolver
-
setDTDHandler
Sets the DTD handler. As the parser is non-validating, this handler is never called.- Specified by:
setDTDHandler
in interfaceParser
- Parameters:
handler
- the DTD handler
-
setDocumentHandler
Allows an application to register a document event handler.- Specified by:
setDocumentHandler
in interfaceParser
- Parameters:
handler
- the document handler
-
setErrorHandler
Allow an application to register an error event handler.- Specified by:
setErrorHandler
in interfaceParser
- Parameters:
handler
- the error handler
-
parse
Parse an XML document.- Specified by:
parse
in interfaceParser
- Parameters:
source
- the input source- Throws:
SAXException
IOException
-
parse
Parse an XML document from a system identifier (URI).- Specified by:
parse
in interfaceParser
- Parameters:
systemId
- the system ID- Throws:
SAXException
IOException
-