0

我有下面的肥皂响应 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>

我需要ContractTypeNetAmount等的值

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

请帮忙。

4

0 回答 0