我该如何解析这个xml?

时间:2010-11-16 10:50:55

标签: xml parsing soap

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <PaymentNotification xmlns="http://apilistener.envoyservices.com">
      <payment>
        <uniqueReference>ESDEUR11039872</uniqueReference>      
        <epacsReference>74348dc0-cbf0-df11-b725-001ec9e61285</epacsReference>
        <postingDate>2010-11-15T15:19:45</postingDate>
        <bankCurrency>EUR</bankCurrency>
        <bankAmount>1.00</bankAmount>
        <appliedCurrency>EUR</appliedCurrency>
        <appliedAmount>1.00</appliedAmount>
        <countryCode>ES</countryCode>
        <bankInformation>Sean Wood</bankInformation>
  <merchantReference>ESDEUR11039872</merchantReference>
   </payment>
    </PaymentNotification>
  </soap:Body>
</soap:Envelope>

2 个答案:

答案 0 :(得分:2)

使用XML解析器。

你是如何得到这个XML的?

答案 1 :(得分:2)

当然,使用您最喜欢的XML解析器。

您没有说明您将使用哪种语言编写消费者.Java具有内置的XML解析器,您也可以尝试使用Apache Xerces解析器。

Python也有一个XML解析器。所以这些天所有语言都是如此。

相关问题