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 with the appropriate error number.

Example

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