All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.microstar.xml.SAXDriver

java.lang.Object
   |
   +----com.microstar.xml.SAXDriver

public class SAXDriver
extends Object
implements XmlHandler, Locator, AttributeList, Parser
A SAX driver for Microstar's Ælfred XML parser.

This driver acts as a front-end for Ælfred, and translates Ælfred's events into SAX events. It implements the SAX parser interface, and you can use it without directly calling Ælfred at all:

 org.xml.sax.Parser parser = new com.microstar.xml.SAXDriver();
 

When you are using SAX, you do not need to use the XmlParser or XmlHandler classes at all: this class is your entry point.

This driver is based on the 1.0gamma version of SAX, available from http://www.megginson.com/SAX/

Version:
1.1
Author:
Copyright (c) 1998 by Microstar Software Ltd., written by David Megginson <dmeggins@microstar.com>
See Also:
Parser, XmlParser

Constructor Index

 o SAXDriver()

Method Index

 o attribute(String, String, boolean)
Implement com.microstar.xml.XmlHandler#attribute.
 o charData(char[], int, int)
Implement com.microstar.xml.XmlHandler#charData.
 o doctypeDecl(String, String, String)
Implement com.microstar.xml.XmlHandler#doctypeDecl.
 o endDocument()
Implement com.microstar.xml.XmlHandler#endDocument.
 o endElement(String)
Implement com.microstar.xml.XmlHandler#endElement.
 o endExternalEntity(String)
Implement com.microstar.xml.XmlHandler#endExternalEntity.
 o error(String, String, int, int)
Implement com.microstar.xml.XmlHandler#error.
 o getColumnNumber()
 o getLength()
 o getLineNumber()
 o getName(int)
 o getPublicId()
 o getSystemId()
 o getType(int)
 o getType(String)
 o getValue(int)
 o getValue(String)
 o ignorableWhitespace(char[], int, int)
Implement com.microstar.xml.XmlHandler#ignorableWhitespace.
 o parse(InputSource)
Parse a document.
 o parse(String)
Parse an XML document from a system identifier (URI).
 o processingInstruction(String, String)
Implement com.microstar.xml.XmlHandler#processingInstruction.
 o resolveEntity(String, String)
Implement com.microstar.xml.XmlHandler.resolveSystemId

Translate to the SAX interface.

 o setDocumentHandler(DocumentHandler)
Set the document handler for this parser.
 o setDTDHandler(DTDHandler)
Set the DTD handler for this parser.
 o setEntityResolver(EntityResolver)
Set the entity resolver for this parser.
 o setErrorHandler(ErrorHandler)
Set the error handler for this parser.
 o setLocale(Locale)
Set the locale.
 o startDocument()
Implement com.microstar.xml.XmlHandler#startDocument.
 o startElement(String)
Implement com.microstar.xml.XmlHandler#startElement.
 o startExternalEntity(String)
Implement com.microstar.xml.XmlHandler#startExternalEntity.

Constructors

 o SAXDriver
 public SAXDriver()

Methods

 o setLocale
 public void setLocale(Locale locale) throws SAXException
Set the locale.

See Also:
setLocale
 o setEntityResolver
 public void setEntityResolver(EntityResolver resolver)
Set the entity resolver for this parser.

Parameters:
handler - The object to receive entity events.
See Also:
setEntityResolver
 o setDTDHandler
 public void setDTDHandler(DTDHandler handler)
Set the DTD handler for this parser.

Parameters:
handler - The object to receive DTD events.
See Also:
setDTDHandler
 o setDocumentHandler
 public void setDocumentHandler(DocumentHandler handler)
Set the document handler for this parser.

Parameters:
handler - The object to receive document events.
See Also:
setDocumentHandler
 o setErrorHandler
 public void setErrorHandler(ErrorHandler handler)
Set the error handler for this parser.

Parameters:
handler - The object to receive error events.
See Also:
setErrorHandler
 o parse
 public void parse(InputSource source) throws SAXException
Parse a document.

If you want anything useful to happen, you should set at least one type of handler.

Parameters:
source - The XML input source.
Throws: SAXException
The handlers may throw any exception.
See Also:
parse, setEntityResolver, setDTDHandler, setDocumentHandler, setErrorHandler
 o parse
 public void parse(String systemId) throws SAXException
Parse an XML document from a system identifier (URI).

See Also:
parse
 o startDocument
 public void startDocument() throws SAXException
Implement com.microstar.xml.XmlHandler#startDocument.

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
startDocument
 o endDocument
 public void endDocument() throws SAXException
Implement com.microstar.xml.XmlHandler#endDocument.

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
endDocument
 o resolveEntity
 public Object resolveEntity(String publicId,
                             String systemId) throws SAXException
Implement com.microstar.xml.XmlHandler.resolveSystemId

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
resolveEntity
 o startExternalEntity
 public void startExternalEntity(String systemId) throws SAXException
Implement com.microstar.xml.XmlHandler#startExternalEntity.

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
startExternalEntity
 o endExternalEntity
 public void endExternalEntity(String systemId) throws SAXException
Implement com.microstar.xml.XmlHandler#endExternalEntity.

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
endExternalEntity
 o doctypeDecl
 public void doctypeDecl(String name,
                         String publicId,
                         String systemId) throws SAXException
Implement com.microstar.xml.XmlHandler#doctypeDecl.

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
doctypeDecl
 o attribute
 public void attribute(String aname,
                       String value,
                       boolean isSpecified) throws SAXException
Implement com.microstar.xml.XmlHandler#attribute.

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
attribute
 o startElement
 public void startElement(String elname) throws SAXException
Implement com.microstar.xml.XmlHandler#startElement.

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
startElement
 o endElement
 public void endElement(String elname) throws SAXException
Implement com.microstar.xml.XmlHandler#endElement.

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
endElement
 o charData
 public void charData(char ch[],
                      int start,
                      int length) throws SAXException
Implement com.microstar.xml.XmlHandler#charData.

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
charData
 o ignorableWhitespace
 public void ignorableWhitespace(char ch[],
                                 int start,
                                 int length) throws SAXException
Implement com.microstar.xml.XmlHandler#ignorableWhitespace.

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
ignorableWhitespace
 o processingInstruction
 public void processingInstruction(String target,
                                   String data) throws SAXException
Implement com.microstar.xml.XmlHandler#processingInstruction.

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
processingInstruction
 o error
 public void error(String message,
                   String url,
                   int line,
                   int column) throws SAXException
Implement com.microstar.xml.XmlHandler#error.

Translate to the SAX interface.

Users should never invoke this method directly.

Throws: SAXException
May throw any exception.
See Also:
error
 o getLength
 public int getLength()
 o getName
 public String getName(int i)
 o getType
 public String getType(int i)
 o getValue
 public String getValue(int i)
 o getType
 public String getType(String name)
 o getValue
 public String getValue(String name)
 o getPublicId
 public String getPublicId()
 o getSystemId
 public String getSystemId()
 o getLineNumber
 public int getLineNumber()
 o getColumnNumber
 public int getColumnNumber()

All Packages  Class Hierarchy  This Package  Previous  Next  Index