SkinLF
Version 1.1

com.l2fprod.contrib.nanoxml.sax
Class SAXParser

java.lang.Object
  |
  +--com.l2fprod.contrib.nanoxml.sax.SAXParser
All Implemented Interfaces:
org.xml.sax.Parser

public class SAXParser
extends java.lang.Object
implements org.xml.sax.Parser

This is the SAX adapter for NanoXML. Note that this adapter is provided to make NanoXML "buzzword compliant". If you're not stuck with SAX compatibility, you should use the basic API (nanoxml.NanoXML) which is much more programmer-friendly as it doesn't require the cumbersome use of event handlers and has more powerful attribute-handling methods, but that is just IMHO. If you really want to use the SAX API, I would like you to point to the currently available native SAX parsers.

Here are some important notes:

$Revision: 1.2 $
$Date: 2001/07/29 20:31:09 $

Version:
1.6
Author:
Marc De Scheemaecker <Marc.DeScheemaecker@advalvas.be>
See Also:
nanoxml.sax.SAXLocator, nanoxml.XMLElement

Constructor Summary
SAXParser()
          Initializes the SAX parser adapter.
 
Method Summary
 void parse(org.xml.sax.InputSource source)
          Parses an XML document.
 void parse(java.lang.String systemId)
          Parses an XML document from a system identifier (URI).
 void setDocumentHandler(org.xml.sax.DocumentHandler handler)
          Allows an application to register a document event handler.
 void setDTDHandler(org.xml.sax.DTDHandler handler)
          Sets the DTD handler.
 void setEntityResolver(org.xml.sax.EntityResolver resolver)
          Sets the entity resolver.
 void setErrorHandler(org.xml.sax.ErrorHandler handler)
          Allows an applicaiton to register an error event handler.
 void setLocale(java.util.Locale locale)
          Sets the locale.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXParser

public SAXParser()
Initializes the SAX parser adapter.

Method Detail

setLocale

public void setLocale(java.util.Locale locale)
               throws org.xml.sax.SAXException
Sets the locale. Only locales using the language english are accepted.

Specified by:
setLocale in interface org.xml.sax.Parser
Throws:
org.xml.sax.SAXException - if locale is null or the associated language is not english.

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver resolver)
Sets the entity resolver. As the DTD is ignored, this resolver is never called.

Specified by:
setEntityResolver in interface org.xml.sax.Parser

setDTDHandler

public void setDTDHandler(org.xml.sax.DTDHandler handler)
Sets the DTD handler. As the DTD is ignored, this handler is never called.

Specified by:
setDTDHandler in interface org.xml.sax.Parser

setDocumentHandler

public void setDocumentHandler(org.xml.sax.DocumentHandler handler)
Allows an application to register a document event handler.

Specified by:
setDocumentHandler in interface org.xml.sax.Parser

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler handler)
Allows an applicaiton to register an error event handler.

Specified by:
setErrorHandler in interface org.xml.sax.Parser

parse

public void parse(org.xml.sax.InputSource source)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parses an XML document.

Specified by:
parse in interface org.xml.sax.Parser
Throws:
org.xml.sax.SAXException - if one of the handlers throws such exception
java.io.IOException - if an I/O exception occured while trying to read the document

parse

public void parse(java.lang.String systemId)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parses an XML document from a system identifier (URI).

Specified by:
parse in interface org.xml.sax.Parser
Throws:
org.xml.sax.SAXException - if one of the handlers throws such exception
java.io.IOException - if an I/O exception occured while trying to read the document

SkinLF
Version 1.1

www.L2FProd.com
© 2000-2001 L2FProd.com