XML declaration added automatically

(This topic is related to bug #7707)

An XML file must start with a "Prolog" or "XML Declaration" defining the XML version and character set used by the file:

<?xml version='1.0' encoding='ISO-8859-1' ?>
<root ...>
...
</root>

Starting with Genero version 2.10.05, the XML Declaration is now added automatically when writing XML files. Before 2.10.05, you could workaround this by writing this header yourself as a processing instruction, but this solution was subject to mistakes: The non-ASCII characters written to the XML file must match the encoding specification in the XML Declaration.

To avoid invalid character set definitions, the Genero BDL built-in classes now add the XML Declaration with the encoding attribute defined according to the current locale used by the runtime system. The value written in the encoding attribute is defined by the charmap.alias file.