XMLType and extra linefeed character

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MarkF
Posts: 211
Joined: Thu 02 Mar 2006 14:55

XMLType and extra linefeed character

Post by MarkF » Tue 05 Feb 2008 14:55

Hi Folks!

I notice that ODAC always returns XMLType fields with an extra linefeed character at the end. Is there any way that this could be fixed? Currently I have to check the datatype and trim the extra character each time. It's not a huge deal, but it would be nice not to have to strip the character all the time.

-Mark Ford
Benthic Software

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 06 Feb 2008 09:01

There is a bug in Oracle 9 client. It performs some normalization of XML value. It adds a linefeed character at the and. Moreover, if a XMLTYPE field contains a value like '', this value is returned as ''#10.

To avoid the problem, select XMLTYPE values as CLOBs, using GETCLOBVAL function of XMLTYPE:

Code: Select all

SELECT t.f_xml.getclobval() FROM t_xml t
You also can upgrage the Oracle client to 10.2 version.

MarkF
Posts: 211
Joined: Thu 02 Mar 2006 14:55

Post by MarkF » Wed 06 Feb 2008 13:27

I still seem to see the extra linefeed on my version 10 clients. The exact version is 10.2.0.1.0 and my server version is 10.2. As mentioned, this isn't a big deal as I'm working around it. Thanks for your suggestions!

-Mark

Post Reply