xml.StaxWriter.startDocument
Writes a XML declaration to the StaxWriter stream.
Syntax
startDocument(
encoding STRING,
version STRING,
standalone INTEGER )
- encoding defines the encoding declaration in the XML declaration. Passing a
NULL
value will use the default UTF-8 encoding. - version defines the XML version in the XML declaration. Passing a
NULL
value will use the default 1.0 version. - standalone defines the XML standalone declaration. Possible values are:
1
: Setstandalone="yes"
.0
: Setstandalone="no"
.-1
: Do not set thestandalone
attribute.
Usage
This method writes a XML declaration to the StaxWriter stream to specify the encoding, the version, and whether the document is standalone.
In case of error, the method throws an exception and sets the
STATUS
variable. Depending on the error, a human-readable description of the
problem is available in the SQLCA.SQLERRM
register. See Error handling in GWS calls (STATUS).
Example
This call:
startDocument("utf-8","1.0",1)
Produces:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
dtd("note [<!ENTITY writer \"Donald Duck.\">]")