oracle11g - handling special characters in oracle xml -


i using dbms_xmlgen package generate xml given query. xml generation failed when query result contains control characters.

ora-31061: xdb error: special char escaped char conversion failed. 

then set dbms_xmlgen.setconvertspecialchars flag false , restarted query , manually trimmed off control characters using regex_replace.

since turn off dbms_xmlgen.setconvertspecialchars , special charcaters in xml contents not got converted . tried convert function treats xml varchar , converting xml tags.

after trimming control characters off have xml below

<a>something < </a> 

i need converted <a>something &lt; </a>(expected) convert gives me &lt;a&gt;something &lt; &lt;/a&gt;(actual)

please me here. in advance


Comments