PLSQL(再次)从 XML 读取值?
我不久前发布了一个关于如何从 XML 读取值的问题,并且有一个完美的答案,它是如此整洁和简单,但我无法理解它并将其应用到其他一些 XML 上!
有人可以帮我解决这个问题吗?我需要读取“id”或“ChangeKey”,
<soap:Envelope>
<soap:Header>
<t:ServerVersionInfo MajorVersion="8" MinorVersion="2" MajorBuildNumber="217" MinorBuildNumber="0"/>
</soap:Header>
<soap:Body>
<m:CreateItemResponse>
<m:ResponseMessages>
<m:CreateItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Items>
<t:CalendarItem>
<t:ItemId Id="erwrweff3424dfw23r2fwfwsfwsfg34fwdf2" ChangeKey="sdfwwerw4224rw"/>
</t:CalendarItem>
</m:Items>
</m:CreateItemResponseMessage>
</m:ResponseMessages>
</m:CreateItemResponse>
</soap:Body>
</soap:Envelope>
我真的感觉不太好,因为我无法理解它!
I posted a while ago a question about how to read values from XML, and there was a perfect answer, it was so neat and so simple yet I can not understand it and apply it on some other XML!!!
can some one help me with this one? I need to read the "id" or the "ChangeKey"
<soap:Envelope>
<soap:Header>
<t:ServerVersionInfo MajorVersion="8" MinorVersion="2" MajorBuildNumber="217" MinorBuildNumber="0"/>
</soap:Header>
<soap:Body>
<m:CreateItemResponse>
<m:ResponseMessages>
<m:CreateItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Items>
<t:CalendarItem>
<t:ItemId Id="erwrweff3424dfw23r2fwfwsfwsfg34fwdf2" ChangeKey="sdfwwerw4224rw"/>
</t:CalendarItem>
</m:Items>
</m:CreateItemResponseMessage>
</m:ResponseMessages>
</m:CreateItemResponse>
</soap:Body>
</soap:Envelope>
I really don't feel good because I'm not able to understanding it!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
执行与您引用的答案中相同的操作,但更改 XPath 表达式(第二个XMLTYPE 的参数) from
to 例如
or
第三个参数需要声明 t 命名空间前缀:
当然,您的输入 XML 也需要声明该命名空间前缀。
Do the same thing as in the answer you referenced, but change the XPath expression (second argument to XMLTYPE) from
to e.g.
or
The third argument will need to declare the t namespace prefix:
and of course your input XML will need to declare that namespace prefix too.