5.5.2 General Procedure for Creating the Sample Program
The following figure shows the general procedure for creating a sample program that uses the SAX parser.
-
Create the callback handler.
When parsing is started using the SAX parser, the information in the XML document is reported from the SAX parser. Create the callback handler to receive the information.
-
Register the callback handler with the SAX parser.
Register the callback handler you created in step 1 with the SAX parser.
-
Pass the XML document to the SAX parser to parse it.
Parse the XML document.
- Methods called by the SAX parser:
-
The following diagram shows the methods called by the SAX parser: