CXML-WRITE-FILE

Writes the data tree to the specified XML file.

Syntax:

CALL "C$XML" USING CXML-WRITE-FILE, handle, filename 

Parameters:

CXML-WRITE-FILE Op-code 35. Numeric data item that specifies the operation to perform. Each operation is defined in acucobol.def, which is included with your system.
handle USAGE handle
filename Literal or pic x(n)

On Entry:

CXML-WRITE-FILE Value 35
handle A parser handle.

On Exit:

RETURN-CODE 0 if an error has occurred. The return code is positive if everything went correctly.

Comments:

If you modify the XML file in any way, you must write to the file for your changes to take effect. Use the CXML-WRITE-FILE op-code for this purpose. You can write to the same file that you opened, or you can write to a new file. The filename that you specify can be anything you want. You cannot, however, write to a URL.

When you are finished writing to the file, you are responsible for releasing the parser from memory. This operation is not performed automatically. To release the parser, use the CXML-RELEASE-PARSER op-code.

Example:

call "C$XML" using CXML-WRITE-FILE,
                  parser-handle
                  "custRec.xml".  
   call "C$XML" using CXML-RELEASE-PARSER,
                  parser-handle.
   stop run.