xml.StaxWriter.startDocument

Writes an XML declaration to the StaxWriter stream.

Syntax

startDocument(
   encoding STRING,
   version STRING,
   standalone INTEGER )
  1. encoding is the encoding of the XML declaration, or NULL to use the default UTF-8 encoding.
  2. version is the XML version of the XML declaration, or NULL to use the default 1.0 version
  3. standalone when TRUE sets the standalone of the XML declaration to "yes", when FALSE sets it to "no" or NULL.

Usage

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",true)

Produces:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
dtd("note [<!ENTITY writer \"Donald Duck.\">]")