Progress
Language Reference


SAVE( ) Method

Saves or sends an XML document.

Return Type: LOGICAL

Applies To: X-document Object Handle

SYNTAX
SAVE( mode , { file | stream | memptr } ) 

mode

“FILE”, “STREAM”, or “MEMPTR”.

file

A character expression that represents the name of a new file to be created in current working directory of the underlying operating system’s file system. If a file with the specified name already exists, its contents will be overwritten.

stream

A character expression that represents the name of a 4GL stream. If stream is “”, Progress saves the document to the 4GL session unnamed stream.

memptr

A MEMPTR variable that contains the saved XML text in memory. The SAVE method allocates the required amount of memory and sets the size of the memptr. You must release the memory later with a SET-SIZE( ) to zero.

The following code fragments demonstrate the use of the SAVE( ) method:

/* Saves the current tree under hDoc as memo.xml. */
DEFINE STREAM mystream.
OUTPUT STREAM mystream to memo.xml.
hdoc:SAVE("stream","mystream").

OR

/* Saves the current tree under hDoc as memo.xml. */
hdoc:SAVE("file","memo.xml").

OR

/* Saves the current tree under hDoc in memory referred to by mymem. */
DEFINE VARIABLE hDoc AS HANDLE.
DEFINE VARIABLE mymem AS MEMPTR.
. . .
hDoc:SAVE("memptr", mymem). 


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