When SAX2 parses a document, the reader passes a series of events to the ContentHandler. For example, for each element in a document, the reader passes the startElement , Characters , and endElement events. To handle these events, you add code to the methods in the ContentHandler to process the information passed by the reader. The ErrorHandler is a class that provides methods for processing error events passed by the reader. At this time, the reader only invokes the fatalError method.
Main form Provides the user interface for the application.
This consists of two text boxes, one for entering a file name and the other for displaying results. This interface also has the Parse and Exit buttons. Creates instances of the reader, ContentHandler, and ErrorHandler. Sets the handler classes to the reader. Sets the source for parsing the document.