PreviousNextIndex

SET-OUTPUT-DESTINATION( ) method

Specifies the target for an XML document that a SAX-writer object creates.

Return type: LOGICAL

Applies to: SAX-writer object handle

Syntax
SET-OUTPUT-DESTINATION ( mode, { file | stream | stream-handle | memptr | 
longchar } ) 

mode

file
stream
stream-handle
memptr
longchar

Use this method to set the output destination, which is where the object will write the XML document. This method must be called before you call any of the writing methods or they will raise errors. You can only call this method when the object’s WRITE-STATUS property is SAX-WRITE-IDLE or SAX-WRITE-COMPLETE. In other words, you cannot set a new output destination while the SAX-writer object is currently writing XML. This method fails and generates an error message if it is called while writing.

The SET-OUTPUT-DESTINATION method does not check if the specified destination is valid. If does not check whether a MEMPTR or LONGCHAR variable is usable, and it does not check whether a file location or stream is accessible. This destination is checked at run time by the START-DOCUMENT method.

When writing to a MEMPTR or LONGCHAR, the method deletes the previous contents and allocates new memory. For example, writing to a MEMPTR is the logical equivalent of using SET-SIZE based upon the document size after calling END-DOCUMENT. This is the same way that the X-document object handles memory.


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex