Progress
External Program
Interfaces


Basic Tasks Of a Progress SAX Application

A typical Progress SAX application does the following:

  1. Creates a SAX-READER object
  2. Runs a persistent procedure that contains the callbacks
  3. Configures the SAX-READER object by:
    1. Setting its HANDLER attribute to the handle of the routine that contains the callbacks
    2. Turning namespace processing and validation on or off as desired
    3. Specifying the input source using the SET-INPUT-SOURCE() method
  4. Starts the parser by calling SAX-PARSE() or SAX-PARSE-FIRST()
  5. Handles XML data passed to the callbacks as the parser proceeds
  6. Monitors the state of the parse by checking error codes and the parse status after each call to SAX-PARSE(), SAX-PARSE-FIRST(), and SAX-PARSE-NEXT()
  7. Releases resources, including deleting the SAX-READER object

Most of these tasks can be performed using the attributes and methods of the SAX-READER object, which are summarized in Table 12–7.

Table 12–7: Tasks Handled By the Attributes and Methods of SAX-READER
To Perform This Task...
Use This Attribute Or Method...
Specify the XML input
SET-INPUT-SOURCE() Method
Specify a search path for the DTD
SCHEMA-PATH Attribute
Tell the parser where the callbacks reside
HANDLER Attribute
Toggle parser options
SUPPRESS-NAMESPACE-PROCESSING Attribute
VALIDATION-ENABLED Attribute
Start, continue, or stop parsing
SAX-PARSE() Method
SAX-PARSE-FIRST() Method
SAX-PARSE-NEXT() Method
STOP-PARSING() Method
Get the status of the parse
LOCATOR-COLUMN-NUMBER Attribute
LOCATOR-LINE-NUMBER Attribute
LOCATOR-PUBLIC-ID Attribute
LOCATOR-SYSTEM-ID Attribute
PARSE-STATUS Attribute
Get or set information concerning this particular SAX-READER object
PRIVATE-DATA Attribute


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095