Procedure xml_init_file PDF Print E-mail
This procedure’s main function is to open the XML file for writing.  The main parameters you will need to provide is the file number and file name (SQR2XML).

For the PeopleCode project, simply put a zero is the first two parameters.

The file number you provide will be the file number used by the SQC to open the file, so be sure to give a number that is not already in use for any open files your SQR is already using.

The file name should include the path and the file name.  The extension on the file can be whatever you prefer, but it is recommended to use XML or XLS as the extension.  (Having XLS as the extension will give more guarantee that the user’s machine will use MicroSoft’s Excel program when opening the XML document.  Excel will detect that the document is in XML on opening, but will process the file correctly.)

The last two parameters are for protecting the structure and windows.  Use zero if you are unsure if you need these.

Syntax

xml_init_file(#File, $file, #ProtectStructure, #ProtectWindows)

Required

Yes

Parameters

#File

File Number

97

 

$file

File Name with Directory

'c:\sqr2xml\test.xls'

 

#ProtectStructure

Enter 1 to protect the structure

0

 

#ProtectWindows

Enter 1 to protect the Window

0

SQR2XML Example

xml_init_file(97, 'c:\sqr2xml\test.xls', 0, 0)

 

PC2XML Example

xml_init_file(0,0,0,0)

Future

The xml_init_environment may be merged into this procedure.

 
Follow us on Twitter
RocketTheme Joomla Templates