PLSQLXML特殊字符转换
---特殊字符转换
目前创新互联已为上千多家的企业提供了网站建设、域名、网页空间、网站托管维护、企业网站设计、阿尔山网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。
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;
当前题目:PLSQLXML特殊字符转换
文章转载:http://myzitong.com/article/ieehde.html