Sorry for being unclear: the xml fragment used here may have come from an external file which I do not know. I.e. the user that created that file may have used "{abc}" or "<![CDATA[{xyz}]]>", but it is all xml, not xquery.
Workflow: - Read external file which contains user provided contents (maybe, with curly braces in some text contents or embedded in CDATA sections) - Replace an existing node in DB with the read xml fragment using parse-xml-fragment()
So, the parse-xml-fragment() function works for now, but will strip off CDATA sections and maybe encode some chars when serializing the data again.
Thanks!
2013/10/25 Christian Grün christian.gruen@gmail.com
Hi Erdal,
similar to Wendell, I’m not quite sure what’s your actual reason for using CDATA elements, the parse-xml() function etc. Talking about your example..
replace(replace('<x><text>{abc}</text><text><![CDATA[{xyz}]]></text></x>',
'{', '{{'),'}', '}}')
..would you like to interpret "abc" as XQuery?
Christian