Keep encoded strings for special characters when extracting a node
619721Jun 17 2008 — edited Jun 24 2008Hi 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