WriteStartDocument Method
The WriteStartDocument method starts writing an XML document in the given encoding to the given file name.
This method has the following syntax:
integer = XMLDocument.WriteStartDocument(
filename = varchar(256),
[, encoding = integer]
[, indent = integer]
[, standalone = integer]
[, failifexists = integer])
This method has the following parameters:
filename
(Required) Specifies the file name of the document to be written
encoding
Specifies the encoding format to use for the file write. Valid values are:
XE_UTF8
XE_UTF16
Default: XE_UTF8
indent
Specifies whether the XML document should be indented (according to the nesting levels of XML elements)
Default: FALSE
standalone
Specifies whether the corresponding XML processing instruction attribute should be set to YES.
Default: FALSE
failifexists
Specifies whether the file should not be overwritten if a file with the same name already exists. Valid values are:
TRUE—do not overwrite file if it exists; return ER_FAIL
FALSE—overwrite file if it exists
Default: FALSE
If the method is successful, it returns ER_OK; otherwise, it returns ER_FAIL. Descriptions of system constant values and their numeric equivalents are listed in
Error Codes.
Last modified date: 12/20/2023