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!

PL/SQL: How to convert '&lt;' to '<' in PLSQL?

frank1018Jul 2 2013 — edited Jul 3 2013

I want to set get '' from input '<?xml version="1.0"?>', how to do that in PLSQL (not in SQL PLUS)?

Here is the procedure I want to run:

DECLARE

v_return VARCHAR2(200);

BEGIN 

v_return :=DBMS_XMLGEN.CONVERT('<?xml version="1.0"?>', DBMS_XMLGEN.ENTITY_ENCODE);

dbms_output.put_line(  'Returns: '||v_return); 

v_return :=DBMS_XMLGEN.CONVERT('&lt;?xml version=&quot;1.0&quot;?&gt;',DBMS_XMLGEN.ENTITY_DECODE);

dbms_output.put_line(  'Returns: '||v_return);

END;

/ 

I don't want to get this when I run this code :

Enter value for lt: Enter value for quot: Enter value for quot: Enter value for gt:
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 31 2013
Added on Jul 2 2013
10 comments
12,153 views