---特殊字符轉換ide
function process_xml(old_xml in varchar2) return varchar2 asregexp
new_xml varchar2(1000);xml
beginit
select replace(old_xml, '<', '<') into new_xml from dual;io
select replace(new_xml, '>', '>') into new_xml from dual;function
select replace(new_xml, '&', '&') into new_xml from dual;class
select replace(new_xml, '''', ''') into new_xml from dual;select
select replace(new_xml, '"', '"') into new_xml from dual;exception
SELECT regexp_replace(new_xml, '^(\W)*|(\W)*$', '')di
INTO new_xml
FROM dual;
return new_xml;
exception
when others then
return 'ERROR!';
end process_xml;