Hi,
I have this kind of XML / example..
declare
l_clob clob;
l_xml xmltype;
begin
l_clob := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fu="http://www.fu.gov.si/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<fu:BusinessPremiseResponse Id="data">
<fu:Header>
<fu:DateTime>2015-10-02T10:56:40.416Z</fu:DateTime>
<fu:MessageID>2107C422-FC85-291C-E053-0CC910AC3C4F</fu:MessageID>
</fu:Header>
<fu:Error>
<fu:ErrorCode>S001</fu:ErrorCode>
<fu:ErrorMessage>eriworwiweorioweriorio</fu:ErrorMessage>
</fu:Error>
</fu:BusinessPremiseResponse>
</soapenv:Body>
</soapenv:Envelope>
';
l_xml := xmltype(l_clob);
put_xl_line(l_xml.extract('/soapenv:Envelope/soapenv:Body/fu:BusinessPremiseResponse/fu:Error/fu:ErrorCode/text()','xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"').getStringVal());
end;
what I want is to extract /soapenv:Envelope/soapenv:Body/fu:BusinessPremiseResponse/fu:Error/fu:ErrorCode
I get this kind of error:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: '/soapenv:Envelope/soapenv:Body/fu:BusinessPremiseResponse/fu:Error/fu:ErrorCode/text()'
ORA-06512: at "SYS.XMLTYPE", line 107
ORA-06512: at line 23
thank you