【发布时间】:2019-08-12 12:02:55
【问题描述】:
这是我的 xml 消息:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<env:Header>
<wsa:Action>http://xmlns.oracle.com/apps/hcm/trees/organizationTreeService//OrganizationTreeService/addValueOrganizationTreeNodeResponse</wsa:Action>
<wsa:MessageID>urn:uuid:d8f54d7e-8319-492a-9e0f-ec48ba2e840c</wsa:MessageID></env:Header><env:Body>
<ns0:addValueOrganizationTreeNodeResponse xmlns:ns0="http://xmlns.oracle.com/apps/hcm/trees/organizationTreeService/types/">
<ns2:treeNodeId xmlns:ns2="http://xmlns.oracle.com/apps/hcm/trees/organizationTreeService/types/" xmlns:ns1="http://xmlns.oracle.com/apps/hcm/trees/organizationTreeService/" xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns0:StringResult">
<ns0:Value>80CF98290891BB06E053C8B0BB0A2848</ns0:Value></ns2:treeNodeId></ns0:addValueOrganizationTreeNodeResponse>
</env:Body></env:Envelope>
我需要从此 xml 消息中获取 value80CF98290891BB06E053C8B0BB0A2848
我正在尝试将此代码放入 xmltable 中,然后放入 mt 自定义表中
select y.JobFamilyId
INTO L_PARENTTRENODEID
from (select xmltype (P_RESPONSE) xml from dual) t,
xmltable(
xmlnamespaces ( 'http://xmlns.oracle.com/apps/hcm/trees/organizationTreeService/' as "ns0" ),
'//ns1:value'
passing t.xml
columns
value varchar2(500) path '/*:value'
) x
【问题讨论】:
-
你还没有问过一个问题——你的代码是错误的,还是得到错误的结果,还是别的什么?
y.JobFamilyId是什么,你指的是什么“自定义标签”?