Skip to Main Content

SQL & PL/SQL

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!

what is best way to remove html encoding in xml generation

JayRAug 14 2016 — edited Aug 29 2016

Hi,

I am using query this way to generate xml output .

  SELECT

        xmlelement("date", xmlattributes(TO_CHAR(sysdate,'YYYY-MM-DD HH24:MI:SS') as "update",  x.count as "count" ),

           xmlagg(

              xmlelement("xyz", xmlattributes( x.last_update as "last_update"),

                    xmlforest(description1, description2 ........).getclobval()  AS XML_STR

Now my issue is that this returning value of xml_str put up some html encoding .

For example if i have & into description it's result into &.  My need is that i have in description1 to be & where as value have into description2 as it is.

I tried DBMS_XMLGEN.CONVERT but not worked for me.

Can you please recommend the best way to achieve this?

Thank You.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 26 2016
Added on Aug 14 2016
12 comments
1,001 views