Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Keep encoded strings for special characters when extracting a node

619721Jun 17 2008 — edited Jun 24 2008
Hi guys,

Please take a look at the following SQL statement:

SELECT sys.xmltype('<?xml version="1.0" encoding="UTF-8" ?><example>& # x20ac;</example>').extract('/example/text()').getstringval()
FROM dual
;

Note: I have added a space after the "&" and after the "#" to make sure that the character is not interpreted by the browser as a euro sign: €

If you execute this SQL statement, the result will be (of course) the euro sign.

What I would like to know is the following:
Is there a way to extract the exact value from the node (i.e.: without being decoded to the euro sign)?
In others words: I would like the result to be "& # x20ac;" instead of the euro sign.

Any help is appreciated!

Kind regards,
Theo
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 22 2008
Added on Jun 17 2008
15 comments
5,092 views