Select Extractvalue(Value(A), 'HISInfo/PatientId'),
Extractvalue(Value(A), 'HISInfo/PatientId/@token')
From Table(Xmlsequence(Extract(Xmltype
('<HISInfo><PatientId token="你是最棒的">郭子豪</PatientId></HISInfo>'),
'HISInfo'))) A;
---这个只能查到最后一个节点包裹的信息
Select *
From xmltable(xmlnamespaces(default 'http://tempuri.org/',
'http://www.w3.org/2003/05/soap-envelope' As "soap"
),
'soap:Envelope/soap:Body/GetQueueInfoResponse' passing
xmltype('<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetQueueInfoResponse
xmlns="http://temp