Data types for archiving XML documents
Use a non-XML column type to store an XML document in a Db2 table only for archiving.
When you store the data in an XML column, the Db2 database server transforms the data into an internal format. When you retrieve the document, the retrieved data is not exactly the same as the original textual XML document. Therefore, the XML column type is not appropriate for archiving.
The best column data type for archiving XML data is a binary data type, such as BLOB. A BLOB type does not store the external encoding of the data, so the XML documents need to have an internal encoding declaration that indicates the original encoding.