Hi all,
Is it possible to have dynamic arguments in xmlnamespaces?
can you point me some directions, please?
with x as(
select rownum as idx, x.*
from
(select XMLType.createxml(p_xml) xml from dual) t,
xmltable(
xmlnamespaces (
'http://schemas.xmlsoap.org/soap/envelope/' as "soap",
'http://webservices.org.com/method/' as "data2",
'http://schemas.org.com/method' as "data3",
default 'http://schemas.org.com/method'
),
'soap:Envelope/soap:Body/data2:method/data3:RecordSet/RecordItem/CustomFieldList/FieldAndValueItem'
passing t.xml
columns
ident varchar2(1000) path 'FieldName',
val varchar2(1000) path 'FieldValue'
) x
)
select max(val) val, ident
from x
group by ident
in here:
xmlnamespaces (
'http://schemas.xmlsoap.org/soap/envelope/' as "soap",
'http://webservices.org.com/method/' as "data2",
'http://schemas.org.com/method' as "data3",
default 'http://schemas.org.com/method'
Thanks,
Neo