I want to parse a xml string that is a web service response sent from servier, the xml looks like this:
20
我想在元素addResult之间获得值20.我的plsql代码段如下所示:
declare
v_xml clob;
begin
v_xml := '<?xml version="1.0" encoding="utf-8"?>
20
';
for c in (select results
from xmltable('Envelope/Body/addResponse' passing xmltype(v_xml)
columns results varchar(100) path './addResult')
)
loop
dbms_output.put_line('the result of calculation is : ' || c.results);
end loop;
end;
seems that nothing was printed out, but if I remove the namespace ‘soap’, the code works well, so can anybody tell me how can I got the value 20 when the xml has namespace?