XML Database (MOSC)

MOSC Banner

Generating prolog with encoding from XMLRoot/XMLSerialize

edited May 2011 in XML Database (MOSC) 1 commentAnswered
Hi,

.

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:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center