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
-
TVScheduleHandler(String, TVScheduleOutputObject)
- TVScheduleHandler()
-
characters(char[], int, int)
- characters
Get character data from parser and append it to our
string buffer
-
endElement(String)
- endElement event -- For now, just prints name of ending tag
-
error(SAXParseException)
- error()
Implements SAX ErrorHandler and prints out an error message
-
fatalError(SAXParseException)
- fatalError()
Implements SAX ErrorHandler and prints out an error message
-
ignorableWhitespace(char[], int, int)
- ignorableWhitespace
throw away whitespace and do nothing with it
-
init()
- Init()
Start parsing the TVSCHEDULE file according to the information
provided in the constructor
-
startElement(String, AttributeList)
-
startElement event:
-
warning(SAXParseException)
- warning()
Implements SAX ErrorHandler and prints out an error message
TVScheduleHandler
public TVScheduleHandler(String inputxml,
TVScheduleOutputObject TVOutArg) throws IOException
- TVScheduleHandler()
- Parameters:
- inputxml - Input XML file name
- TVOut - Class & methods to accept parsed output
init
public void init() throws Exception
- Init()
Start parsing the TVSCHEDULE file according to the information
provided in the constructor
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
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
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
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
error
public void error(SAXParseException e)
- error()
Implements SAX ErrorHandler and prints out an error message
- Parameters:
- e - SAXParseException
- Overrides:
- error in class HandlerBase
warning
public void warning(SAXParseException e)
- warning()
Implements SAX ErrorHandler and prints out an error message
- Parameters:
- e - SAXParseException
- Overrides:
- warning in class HandlerBase
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