<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"><soap:Body>
   <m:GetPrice xmlns:m="http://www.w3school.com.cn/prices">
      <m:Item>Apples</m:Item>
   </m:GetPrice>
</soap:Body></soap:Envelope>
c#代码获取到Apples. soapxml.SelectSingleNode("........");...应该填什么?

解决方案 »

  1.   

    ff8213460
    给我回复了三次.我都没看见内容,就被版主删掉了.
    求解...
    Why??
      

  2.   


     XmlDocument xd = new XmlDocument();
                xd.Load("soap.xml");
                XmlNamespaceManager man = new XmlNamespaceManager(xd.NameTable);
                man.AddNamespace("soap", "http://www.w3.org/2001/12/soap-envelope");
                man.AddNamespace("m", "http://www.w3school.com.cn/prices");
                string aa = xd.SelectSingleNode("/soap:Envelope/soap:Body/m:GetPrice/m:Item",man).InnerText;
    我自己解决了..
    下面跟帖的前两个人..一人20分..结贴...
      

  3.   

    其实就是读取xml的操作,熟悉xpath就可以了