SAXParser Class Reference

List of all members.


Detailed Description

A SAX parser.

This class encapsulates the underlying parser implementation. We support only the SAX1 interface for now.

Specify the SAXParser implementation by adding the property SAXParser.ClassName to the onewire.properties file with the fully qualified classname of an implementation of org.xml.sax.Parser. The default classname used is for nanoxml's parser: nanoxml.sax.SAXParser.

Author:
Kelly

Public Member Functions

 SAXParser ()
 Construct the SAX parser.
void setLocale (Locale locale) throws SAXException
 Set the locale for errors and warnings.
void setEntityResolver (EntityResolver resolver)
 Register a custom entity resolver.
void setDTDHandler (DTDHandler handler)
 Register a DTD event handler.
void setDocumentHandler (DocumentHandler handler)
 Register a document event handler.
void setErrorHandler (ErrorHandler handler)
 Register an error event handler.
void parse (InputSource inputSource) throws SAXException, IOException
 Parse an XML document.
void parse (String systemID) throws SAXException, IOException
 Parse an XML document specified by system identifier or URL.

Member Function Documentation

void setLocale ( Locale  locale  )  throws SAXException

Set the locale for errors and warnings.

Parameters:
locale The locale to use.
Exceptions:
SAXException If the locale is not supported.

void setEntityResolver ( EntityResolver  resolver  ) 

Register a custom entity resolver.

If one is not registered, the parser will resolve system identifiers in an implementation dependent way.

Parameters:
resolver The entity resolver to use.

void setDTDHandler ( DTDHandler  handler  ) 

Register a DTD event handler.

If one is not registered, all DTD events reported by the parser will be ignored.

Parameters:
handler The DTD handler to use.

void setDocumentHandler ( DocumentHandler  handler  ) 

Register a document event handler.

If one is not registered, all document events reported by the parser will be ignored.

Parameters:
handler The document handler to use.

void setErrorHandler ( ErrorHandler  handler  ) 

Register an error event handler.

If one is not registered, all error events except for fatalError are ignored. A fatalError thorws a org.xml.sax.SAXException.

Parameters:
handler The error handler to use.

void parse ( InputSource  inputSource  )  throws SAXException, IOException

Parse an XML document.

Parameters:
source Source of the document to parse.
inputSource 
Exceptions:
SAXException Any SAX exception, possibly wrapping another exception.
IOException If an I/O error occurred while reading the document.

void parse ( String  systemID  )  throws SAXException, IOException

Parse an XML document specified by system identifier or URL.

Parameters:
systemID The system ID or URL of the document to parse.
Exceptions:
SAXException Any SAX exception, possibly wrapping another exception.
IOException If an I/O error occurred while reading the document.


The documentation for this class was generated from the following file:

Generated on Thu Aug 28 15:42:32 2008 for 1-Wire API for .NET by  doxygen 1.5.6