Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : SAX-PARSE-FIRST( ) method
 

SAX-PARSE-FIRST( ) method

Initializes and begins a progressive-scan parse of an XML document associated with a SAX-reader object.
Return type: None
Applies to: SAX-reader object handle

Syntax

SAX-PARSE-FIRST ( )
To continue a progressive-scan parse, call SAX-PARSE-NEXT( ) repeatedly.
When SAX-PARSE-FIRST( ) executes, the AVM invokes the StartDocument callback, if there is one. SAX-PARSE-FIRST( ) raises an ABL error if the parser fails, for any reason, to start parsing the XML source.
If SAX-PARSE-FIRST( ) is called on a source file already being parsed with SAX-PARSE-NEXT( ), the parser reinitializes the parsing process.
SAX-PARSE-FIRST( ) can be called with SAX-reader in any state.
Note: SAX-PARSE-FIRST( ) does not have a return value. To detect if an error has occurred, add NO-ERROR to the call and when it returns, check ERROR-STATUS:ERROR.