.XML WRITER OPEN
This subroutine creates and opens an XML file. Added in 6.2.0
Usage:
PASS <XML_stream_name> FIELD SHARE? N
PASS <XML_file_pathname> FIELD SHARE? N
PASS <encoding> FIELD SHARE? N
PASS <version> FIELD SHARE? N
PASS <standalone> FIELD SHARE? N
GOSUB --- .XML WRITER OPEN
* Check for errors
IF --- .XML WRITER OPEN NE
Description:
This subroutine creates and opens a new XML file. If the file already exists, it will replace it. It also adds the <?xml version="1.0" encoding="UTF-8" standalone="yes"?> tag to it.
<XML_stream_name> is a name that you assign to this XML file. You can use this name in the following calls to add more data to this XML file. This field is required and cannot be more than 22 characters.
<XML_file_pathname> is the XML file path name on the server. If the file already exist, it will be replaced by a new empty file. This field is required and cannot be more than 2048 characters.
<encoding> is the character encoding of the XML file. It is also being added as "encoding" attribute to the <?xml encoding="[encoding]" ?> tag of the file. APPX automatically converts the encoding of the data being written to this xml file. This is an optional parameter and the default value for it is UTF-8.
<version> is an optional parameter which specifies the version of this XML file. Valid versions are "1.0", "1.1", and "2.0". The default value if not passed is "1.0". It is being added as "version" attribute to <?xml version="[version]"?> tag.
<standalone> is another optional parameter which specifies if this XML file is standalone or not. Valid values for this field is "Y" or "N". It is being added as "standalone" attribute to <?xml standalone="[yes/no]"?> tag. If not passed appx assumes default value of "Y" for this field.
You can check the value of --- .XML WRITER OPEN field after the api call to check for errors.
See also
.XML WRITER CLOSE
Comments:
Read what other users have said about this page or add your own comments.