Previous Next

SAX-PARSE-NEXT( ) method
Continues a progressive-scan parse of an XML document associated with a SAX-reader object.
Return type:
Applies to:
 
Syntax 
SAX-PARSE-NEXT ( )
SAX-PARSE-NEXT( ) returns after the parser finds the next XML token in the XML source and the AVM invokes the corresponding callback, if it exists.
When SAX-PARSE-NEXT( ) starts, an error is raised if the PARSE-STATUS attribute is anything other than SAX-RUNNING. This might occur if:
*
*
Eventually, SAX-PARSE-NEXT( ) fails to find another XML token (assuming the parse does not stop early). When this happens, the AVM sets the PARSE-STATUS attribute to SAX-COMPLETE. If SAX-PARSE-NEXT( ) is called at that point, an error is raised.
Note:
To stop a progressive-scan parse, you can refraining from calling SAX-PARSE-NEXT( ). However, when you detect that it is time to stop, you will most likely be in a callback, so you need a way to communicate that it is time to stop to the driver (where SAX-PARSE-NEXT( ) is called). A convenient way to do that is to call SELF:STOP-PARSING( ), since that causes the AVM to set the value of PARSE-STATUS to SAX-COMPLETE.

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.