Try OpenEdge Now
skip to main content
Working with XML
Reading XML Documents with the Simple API for XML (SAX) : Understanding ABL SAX : SAX-reader object
 

SAX-reader object

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 Parsing with one call or with multiple calls.
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 OpenEdge Development: ABL Reference.
Table 6. 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
Specify the location of the SAX callback procedures.
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.