xmlWriterStartDocument

SYNOPSIS

int xmlWriterStartDocument(xmlWriter writer, string version
            [, string encoding [, string standalone]])

Parameters:

  • writer - the xmlWriter

  • version - the XML version to use (usually 1.0)

  • encoding (optional) - what character encoding to use for the document. UTF-8 is used by default.

  • standalone (optional) - pass yes to make this a standalone XML document. See http://www.w3.org/TR/REC-xml/#sec-rmd for more information. The value no may be passed to make the document not standalone (default).

Returns:

  • the bytes written (may be 0 because of buffering) or -1 in case of error


DESCRIPTION
xmlWriterStartDocument() starts the XML document in writer. This consists of writing out the XML declaration, such as <?xml version="1.0" encoding="UTF-8"?>


EXAMPLE

<$ret = (xmlWriterStartDocument($writer, '1.0', 'UTF-8'))>


SEE ALSO
xmlWriterNewToFile, xmlWriterNewToString, xmlWriterSetIndent


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.