IBM Books

XML Extender Administration and Programming


Encoding declaration

The encoding declaration declares the encoding of the XML document and appears on the XML declaration statement. DB2 and XML Extender ignore the encoding declaration value, but the value must be consistent with the client code page.

The default value of the encoding declaration is UTF-8, and the absence of an encoding declaration means the document is in UTF-8.

Ensuring that the encoding of a document is consistent with the client is important because XML tools, like parsers, generate an error for an entity that includes an encoding declaration other than that named in the declaration. XML Extender assumes that an XML document is in the database server encoding and overrides the declared encoding of an XML document when parsing it.

To declare an encoding value:

In the XML document declaration specify the encoding declaration with the name of the code page of the client. For example:

<?xml version="1.0" encoding="UTF-8" ?>


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]