xmlDeclaration

fun xmlDeclaration(version: String = "1.0", encoding: String = "UTF-8", standalone: Boolean? = null)(source)

Adds an XML declaration to the document.

Parameters

version

The XML version (default is "1.0")

encoding

The character encoding (default is "UTF-8")

standalone

Whether the document is standalone (default is null, which means the attribute is not included)