---特殊字符转换
function process_xml(old_xml in varchar2) return varchar2 as
new_xml varchar2(1000);
begin
select replace(old_xml,'<','<') into new_xml from dual;
select replace(new_xml,'>','>') into new_xml from dual;
select replace(new_xml,'&','&') into new_xml from dual;
select replace(new_xml,'''',''') into new_xml from dual;
select replace(new_xml,'"','"') into new_xml from dual;
SELECT regexp_replace(new_xml,'^(\W)*|(\W)*$','')
INTO new_xml
FROM dual;
return new_xml;
exception
when others then
return 'ERROR!';
end process_xml;
原文链接:https://www.f2er.com/xml/294478.html