Dallas Semiconductor 1-Wire API 1.00 Alpha: Class SAXParser

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.dalsemi.onewire.application.tag
Class SAXParser

    java.lang.Object
      |
      +--com.dalsemi.onewire.application.tag.SAXParser

All Implemented Interfaces:
  org.xml.sax.Parser

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

A SAX parser. This class encapsulates the underlying parser implementation (which is currently MinML). We support only the SAX1 interface for now.

Constructor Summary
`SAXParser()` Construct the SAX parser.

Method Summary
`void` | `parse(org.xml.sax.InputSource inputSource)` Parse an XML document.
`void` | `parse(String systemID)` Parse an XML document specified by system identifier or URL.
`void` | `setDocumentHandler(org.xml.sax.DocumentHandler handler)` Register a document event handler.
`void` | `setDTDHandler(org.xml.sax.DTDHandler handler)` Register a DTD event handler.
`void` | `setEntityResolver(org.xml.sax.EntityResolver resolver)` Register a custom entity resolver.
`void` | `setErrorHandler(org.xml.sax.ErrorHandler handler)` Register an error event handler.
`void` | `setLocale(Locale locale)` Set the locale for errors and warnings.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SAXParser

    public SAXParser()

  Construct the SAX parser.

Method Detail

### setLocale

    public void setLocale(Locale locale)
                   throws org.xml.sax.SAXException

  Set the locale for errors and warnings.
  Specified by:
    `setLocale` in interface `org.xml.sax.Parser`
  Parameters:
    `locale` - The locale to use.
  Throws:
    `org.xml.sax.SAXException` - If the locale is not supported.

### setEntityResolver

    public void setEntityResolver(org.xml.sax.EntityResolver resolver)

  Register a custom entity resolver. If one is not registered, the parser will resolve system identifiers in an implementation dependent way.
  Specified by:
    `setEntityResolver` in interface `org.xml.sax.Parser`
  Parameters:
    `resolver` - The entity resolver to use.

### setDTDHandler

    public void setDTDHandler(org.xml.sax.DTDHandler handler)

  Register a DTD event handler. If one is not registered, all DTD events reported by the parser will be ignored.
  Specified by:
    `setDTDHandler` in interface `org.xml.sax.Parser`
  Parameters:
    `handler` - The DTD handler to use.

### setDocumentHandler

    public void setDocumentHandler(org.xml.sax.DocumentHandler handler)

  Register a document event handler. If one is not registered, all document events reported by the parser will be ignored.
  Specified by:
    `setDocumentHandler` in interface `org.xml.sax.Parser`
  Parameters:
    `handler` - The document handler to use.

### setErrorHandler

    public void setErrorHandler(org.xml.sax.ErrorHandler handler)

  Register an error event handler. If one is not registered, all error events except for `fatalError` are ignored. A `fatalError` thorws a `SAXException`.
  Specified by:
    `setErrorHandler` in interface `org.xml.sax.Parser`
  Parameters:
    `handler` - The error handler to use.

### parse

    public void parse(org.xml.sax.InputSource inputSource)
               throws org.xml.sax.SAXException,
                      IOException

  Parse an XML document.
  Specified by:
    `parse` in interface `org.xml.sax.Parser`
  Parameters:
    `source` - Source of the document to parse.
    `inputSource` -
  Throws:
    `org.xml.sax.SAXException` - Any SAX exception, possibly wrapping another exception.
    `IOException` - If an I/O error occurred while reading the document.

### parse

    public void parse(String systemID)
               throws org.xml.sax.SAXException,
                      IOException

  Parse an XML document specified by system identifier or URL.
  Specified by:
    `parse` in interface `org.xml.sax.Parser`
  Parameters:
    `systemID` - The system ID or URL of the document to parse.
  Throws:
    `org.xml.sax.SAXException` - Any SAX exception, possibly wrapping another exception.
    `IOException` - If an I/O error occurred while reading the document.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD