Hello,
I want to parse a xml send as web service response, it looks like this
with sample_data as (
select xmltype('<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<m:ListOfCountryNamesByNameResponse xmlns:m="http://www.oorsprong.org/websamples.countryinfo">
<m:ListOfCountryNamesByNameResult>
<m:tCountryCodeAndName>
<m:sISOCode>AX</m:sISOCode>
<m:sName>cland Islands</m:sName>
</m:tCountryCodeAndName>
</m:ListOfCountryNamesByNameResult>
</m:ListOfCountryNamesByNameResponse>
</soap:Body>
</soap:Envelope>') xml
from dual)
select x.sName from sample_data t, xmltable(
xmlnamespaces(
default 'http://www.oorsprong.org/websamples.countryinfo/',
'http://schemas.xmlsoap.org/soap/envelope' as "soap",
'http://www.oorsprong.org/websamples.countryinfo' as "m"),
'/soap:Envelope/soap:Body/ListOfCountryNamesByNameResponse/m:ListOfCountryNamesByNameResult/m:tCountryCodeAndName' passing
t.xml columns
sName varchar2(100) path './m:sName')
x;
but never get any rows selected.
can anyone help me to solve this problem?
Thanks
Marco