【发布时间】:2013-04-04 04:51:08
【问题描述】:
有人可以告诉我如何在 .NET 3.5 Framework 下使用 XPath 和 C# 从下面的 XML 中提取 Errors 元素吗?
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:do_OTA_VehAvailRateRQResponse xmlns:ns1="urn:vanguard-web-webservices-ota-IOTA" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:string"><OTA_VehAvailRateRS TimeStamp="2013-04-03T18:16:00" TransactionIdentifier="215997103" SequenceNmbr="1" Target="Production" Version="2.0" xmlns="http://www.opentravel.org/OTA/2003/05">
<Errors>
<Error Type="1" Code="999">COMPANY NAME FIELD IS INVALID</Error>
</Errors>
</OTA_VehAvailRateRS>
</return>
</ns1:do_OTA_VehAvailRateRQResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
【问题讨论】:
-
你能澄清一下你有什么问题吗?到目前为止,您已经发布了大量代码,很难看出您有问题的部分。
-
这些可怕的问题如何获得支持?我们是否忽略了常见问题解答?现在?
-
否决了这个问题。不发布失败代码的人当然不值得点赞。