Generating prolog with encoding from XMLRoot/XMLSerialize
.
I use the Oracle 10.2 SQL functions (XMLElement etc.) to generate XML from the database.
.
I am trying to generate an XML document with the following prolog:
<?xml version="1.0" encoding="UTF-8"?>
.
I am looking at XMLRoot and XMLSerialize. The former has a version parameter but no encoding. The latter only has encoding for BLOBs (while I need to use CLOBs).
.
The XML DB Dev Guide says about XMLSerialize:
"If the underlying CLOB value or string has encoding information, then an appropriate encoding="..." declaration is added to the prolog."
I'm not sure what it means that the underlying value has encoding information. The only examples I find on the Internet use XMLSerialize in conjunction with XMLType and a hard-coded XML string, and that's not what I want: