Re: xmltable and namespaces
Date: Fri, 4 Feb 2011 06:52:16 +0800
Message-ID: <iifbj0$ii8$1_at_speranza.aioe.org>
"Gerard H. Pille" <ghp_at_skynet.be> wrote in message
news:4d4af3de$0$14262$ba620e4c_at_news.skynet.be...
> declare
> soap_resp varchar(32767);
> resp sys.xmltype;
> begin
> soap_resp := '<GetStaffDetailsResponse
> xmlns="https://www.axby.com/staffQuery/">
> <GetStaffDetailsResult>
> <StaffDetails>
> <AuEduPersonPreferredGivenName>Bruce</AuEduPersonPreferredGivenName>
> <AuEduPersonPreferredSurname>Coad</AuEduPersonPreferredSurname>
> <EmployeeID>000715BC</EmployeeID>
> </StaffDetails>
> </GetStaffDetailsResult>
> </GetStaffDetailsResponse>';
>>
> resp := xmltype.createxml(soap_resp);
>
> for r in (
> select
> extractvalue(
> resp,
> '/GetStaffDetailsResponse/GetStaffDetailsResult/StaffDetails/EmployeeID',
> 'xmlns="https://www.axby.com/staffQuery/"') X
> from dual
> ) loop
> dbms_output.put_line('Hello:' || r.X);
> end loop;
> end;
> /
> >
> Thanks to Flavio Casetta's "Annals of Oracle's Improbable Errors" :
> http://oraclequirks.blogspot.com/2008/05/oracles-xml-sql-functions-and-default.html
Hi Gerard,
Thanks for the reply.
Not wanting to take anything away from Flavio but, yes, we do need to have repeating StaffDetails tags. Can anyone help with this?
Surely ther is just some simple "a/b/c" qualification or syntax/switch?
Cheers Richard Maher Received on Thu Feb 03 2011 - 16:52:16 CST