The application creates a SAX-reader object and uses it to control the XML parser.

The application can parse an XML document in one call or in multiple calls. For more information on this topic, see Parse an XML document.

When your application finishes parsing the XML document, you must delete the SAX-reader object.

The following table summarizes the attributes and methods associated with the SAX-reader object. For complete reference entries, see ABL Reference.

Table 1. SAX-reader attribute and method summary
This attribute or method . . . Lets you . . .
SET-INPUT-SOURCE( ) method Specify the XML input.
SCHEMA-PATH attribute Specify a search path for the Document Type Definition (DTD) or any other external entities.
SCHEMA-LOCATION attribute

ADD-SCHEMA-LOCATION( ) method

The SCHEMA-LOCATION attribute contains a whitespace separated list of namespace and XML Schema location pairs.

The ADD-SCHEMA-LOCATION( ) method allows you to add another pair to this list. SAX-reader uses each XML Schema specified to validate XML elements with matching namespaces.

NONAMESPACE-SCHEMA-LOCATION attribute Specify the location of an XML Schema that does not specify a target namespace. The SAX-reader object uses this XML Schema to validate XML elements that are not in a namespaceThe value of this attribute is a single URI indicating the schema location, not pairs of namespace/location URIs for mapping namespaces to schema locations. Most schemas specify a target namespace. When one of those schemas is used, then the ADD-SCHEMA-LOCATION( ) method and SCHEMA-LOCATION attribute are used. If a schema does not specify a target namespace, but simply describes the structure of an XML document, the NONAMESPACE-SCHEMA-LOCATION is used.
HANDLER attribute

A handle to the procedure containing the callback procedures for the SAX-Reader callback events.

EVENT-HANDLER-OBJECT attribute An object-oriented ABL object reference that is the callback handler containing callback methods for the SAX-Reader callback events.
SUPPRESS-NAMESPACE-PROCESSING attribute

VALIDATION-ENABLED attribute
Toggle parser options.
SAX-PARSE( ) method

SAX-PARSE-FIRST( ) method

SAX-PARSE-NEXT( ) method

STOP-PARSING( ) method
Start, continue, or stop parsing.
LOCATOR-COLUMN-NUMBER attribute

LOCATOR-LINE-NUMBER attribute

LOCATOR-PUBLIC-ID attribute

LOCATOR-SYSTEM-ID attribute

PARSE-STATUS attribute
Get the status of the parse.
TYPE attribute Get the type of the object, which is always SAX-READER.
ADM-DATA attribute

HANDLE attribute

INSTANTIATING-PROCEDURE attribute

PRIVATE-DATA attribute

UNIQUE-ID attribute
Get or set information concerning this particular SAX-reader object.
ENTITY-EXPANSION-LIMIT attribute Set the maximum number of entity substitutions the XML parser will permit in a document.
STRICT-ENTITY-RESOLUTION attribute Set whether or not the XML parser will attempt to resolve an external entity if the entity is located outside of the directories in the SCHEMA-PATH attribute.