All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dmoisan.xml.tvschedule.TVScheduleHandler

java.lang.Object
   |
   +----org.xml.sax.HandlerBase
           |
           +----dmoisan.xml.tvschedule.TVScheduleHandler

public class TVScheduleHandler
extends HandlerBase
TVScheduleHandler -- Reads TVSCHEDULE XML files and parses them for further processing Handles parsing events and main processing for TVSCHEDULE XML files. Implements DocumentHandler parsing callback methods and dispatches them to TVSchedule-specific processing methods, processing them with the methods specified in the TVScheduleOutputObject class. (So far only ScalaScript is defined but there may be other methods in the future.) Uses Microstar's Aelfred SAX implementation. See ScXML for specific details on use.

Permission is granted to use this code for commercial or non-commercial purposes. NO WARRANTY IS IMPLIED.

See Also:
ScXML, TVScheduleOutputObject, ScScript

Constructor Index

 o TVScheduleHandler(String, TVScheduleOutputObject)
TVScheduleHandler()

Method Index

 o characters(char[], int, int)
characters Get character data from parser and append it to our string buffer
 o endElement(String)
endElement event -- For now, just prints name of ending tag
 o error(SAXParseException)
error() Implements SAX ErrorHandler and prints out an error message
 o fatalError(SAXParseException)
fatalError() Implements SAX ErrorHandler and prints out an error message
 o ignorableWhitespace(char[], int, int)
ignorableWhitespace throw away whitespace and do nothing with it
 o init()
Init() Start parsing the TVSCHEDULE file according to the information provided in the constructor
 o startElement(String, AttributeList)
startElement event:
 o warning(SAXParseException)
warning() Implements SAX ErrorHandler and prints out an error message

Constructors

 o TVScheduleHandler
 public TVScheduleHandler(String inputxml,
                          TVScheduleOutputObject TVOutArg) throws IOException
TVScheduleHandler()

Parameters:
inputxml - Input XML file name
TVOut - Class & methods to accept parsed output

Methods

 o init
 public void init() throws Exception
Init() Start parsing the TVSCHEDULE file according to the information provided in the constructor

 o startElement
 public void startElement(String name,
                          AttributeList attrs) throws SAXException
startElement event:

Parameters:
name - Element name (String)
attrs - attribute list (if any) (AttributeLIst)
Throws: SAXException
Thrown by parser. May enclose another exception
Overrides:
startElement in class HandlerBase
 o endElement
 public void endElement(String name) throws SAXException
endElement event -- For now, just prints name of ending tag

Parameters:
name - Element name (String)
Throws: SAXException
Thrown by parser. May enclose another exception
Overrides:
endElement in class HandlerBase
 o characters
 public void characters(char ch[],
                        int start,
                        int length)
characters Get character data from parser and append it to our string buffer

Parameters:
char[] - ch Character data array
int - start Start index of character data
int - length Length of character data
Overrides:
characters in class HandlerBase
 o ignorableWhitespace
 public void ignorableWhitespace(char ch[],
                                 int start,
                                 int length)
ignorableWhitespace throw away whitespace and do nothing with it

Parameters:
char[] - ch Character data
int - start start index of whitespace chars
int - length length
Overrides:
ignorableWhitespace in class HandlerBase
 o error
 public void error(SAXParseException e)
error() Implements SAX ErrorHandler and prints out an error message

Parameters:
e - SAXParseException
Overrides:
error in class HandlerBase
 o warning
 public void warning(SAXParseException e)
warning() Implements SAX ErrorHandler and prints out an error message

Parameters:
e - SAXParseException
Overrides:
warning in class HandlerBase
 o fatalError
 public void fatalError(SAXParseException e) throws SAXException
fatalError() Implements SAX ErrorHandler and prints out an error message

Parameters:
e - SAXException
Throws: SAXException
Thrown by parser. May enclose another exception
Overrides:
fatalError in class HandlerBase

All Packages  Class Hierarchy  This Package  Previous  Next  Index