Progress
External Program
Interfaces
Example Of Creating an Output XML File
The following sample program creates an XML file consisting of all fields in all the customer records where the cust-num is less than “5". You must use the SAVE( ) method on the X-DOCUMENT object in order to create the actual XML file:
A partial output of the above program appears below. Note that the carriage returns and indentations have been entered for readability; the actual file contains one long string:
Writing an XML File To a MEMPTR Or a Stream
You can also write an XML file to a MEMPTR or to an output stream as the following code fragments demonstrate. The following fragment shows saving an XML file to a MEMPTR:
The following fragment displays saving an XML file to an output stream:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |