Progress
Version 9
Product Update Bulletin


SAX-PARSE-NEXT() Method

Continues a progressive-scan parse of an XML document associated with a SAX-READER object.

Return Type: No return value

Applies To: SAX-READER Object

SYNTAX

SAX-PARSE-NEXT ( ) 

SAX-PARSE-NEXT() returns after the parser finds the next XML token in the XML source and Progress 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, Progress sets the PARSE-STATUS attribute to SAX-COMPLETE. If SAX-PARSE-NEXT() is called at that point, an error is raised.

NOTE: SAX-PARSE-NEXT() 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.

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 Progress to set the value of PARSE-STATUS to SAX-COMPLETE.


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