Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在VB.net中解析Soap响应_C#_Vb.net_Xml Parsing_Soap Client_Xmldocument - Fatal编程技术网

C# 在VB.net中解析Soap响应

C# 在VB.net中解析Soap响应,c#,vb.net,xml-parsing,soap-client,xmldocument,C#,Vb.net,Xml Parsing,Soap Client,Xmldocument,下面是Soap响应XML字符串 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc

下面是Soap响应XML字符串

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Header />
  <soapenv:Body>
    <qu:quotationResponse xmlns:qu="http://Reliance_RENEWAL_Quotation/IRenewal_Quotation">
      <response><?xml version="1.0" encoding="UTF-8"?>
        <RENEWAL-QUOTATION-RESPONSE>
          <MESSAGE-DATA>
            <ContractType>XYZ </ContractType>
            <PremiumAmount>10000</PremiumAmount>
            <PremiumSuspense>0.0</PremiumSuspense>
            <NetAmmount>10000.0</NetAmmount>
            <ContractPremiumStatus>Surrender </ContractPremiumStatus>
            <ContractOwnerClientNumber>0501234</ContractOwnerClientNumber>
            <OwnerName>SUDZ</OwnerName>
            <LifeAssuredClientNumber>12312312</LifeAssuredClientNumber>
            <LifeAssuredName>SUDZ </LifeAssuredName>
            <PaidTodate>20110731</PaidTodate>
            <ReinstatementFee>0.0</ReinstatementFee>
            <ContractNumber>1122112211</ContractNumber>
          </MESSAGE-DATA>
          <ERROR-DETAILS>
            <ErrorCode>No Errors</ErrorCode>
            <ErrorDesc></ErrorDesc>
          </ERROR-DETAILS>
        </RENEWAL-QUOTATION-RESPONSE>
      </response>
    </qu:quotationResponse>
  </soapenv:Body>
</soapenv:Envelope>

XYZ
10000
0
10000
投降
0501234
苏伊兹
12312312
苏伊兹
20110731
0
1122112211
没有错误
我需要ContractTypeNetAmount等的值

我试过了,但无法解析。 解析上述xml的最佳方法是什么


请提供帮助。

您可以使用XmlDocument类或XmlReader类。@CSharper:您能提供任何示例吗检查这个问题是否有用