Cross-platform of parsed XML images

[CR #332012] You cannot use bcp or replicate parsed XML image data between a big-endian platform and a little-endian platform, for example between a Solaris platform (big-endian) and a Linux or Windows platform (little-endian).

The term “parsed XML image data” refers to data of image datatype that is generated by the xmlparse built-in function.

Workaround: When you transfer XML data between platforms, transfer the character form of the XML documents rather than the parsed XML form. If you have not stored the character form of the XML documents, you can regenerate it from the parsed form. For example, if column xmlindexed of the xmldocuments table is an image column containing parsed XML image data, the following two commands append a new text column to the table and populate it with a character form of the documents contained in the xmlindexed column:

alter table xmldocuments add xmltext text
update xmldocuments set xmltext = xmlextract('/', xmlindexed)

Then you can use bcp or replicate the xmltext column from one platform to the other.