Upgrade to 11g: XML function ExtractValue: Additional Spaces and Line Feed

Metalink note:

“Additional Spaces and Line Feed Added When Extracting Element With ExtractValue() [ID 369934.1] ”

The XML function ExtractValue in 10g Oracle strips spaces and line feeds but in Oracle 11g preserves. Oracle 11g behavior is according to the standard. Oracle 10g is wrong. However the pl/sql code written for 10g fails on 11g.

One of possible workarrounds is to  modify the source code to trim spaces and line feeds:

RTRIM(TRIM(RTRIM(TRIM(extractValue(c, xpath, namespace)),chr(10))),chr(10))

Another possible solution would be to overload extractValue. However extractValue seems to be inbuilt SQL function meaning overloading failed (for me.)



This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s