db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <qoz...@gmail.com>
Subject Re: XMLPARSE/XMLSERIALIZE question
Date Tue, 29 Aug 2006 17:18:44 GMT
Suavi Ali Demir wrote:
> Is the output of XMLSERIALIZE varchar?

The output of XMLSERIALIZE is provided as part of the syntax.  Right now Derby 
requires that the target type be a SQL character type: CHAR, VARCHAR, LONG 
VARCHAR, or CLOB.

> If you get back a byte[] (or binary data), it should put the xml header 
> so that the client can parse the xml using correct encoding. 

Derby doesn't currently allow serialization to a binary type, so it looks like 
the xml header isn't required.

>   I am speculating that when you use xmlserialize, you probably serialize
> into varchar, so there is no need for encoding info. As far as the rest of
> the xml header goes, without the header it is still parseable, or it is 
> easier for the client to add <?xml version="1.0"?> characters than to
> remove them (The client may want to plug this xml content into an existing
> xml, if there is xml header it causes pain), so it is working correctly 
> i think.

Thanks for the extra input, Suavi!

Army


Mime
View raw message