XD["soap:Envelope"]["soap:Body"]["GetIDCardInfoResponse"]
解决方案 »
- 请求WEB上传和下载的特殊要求
- 关于Jquery的Ajax问题
- c# 向RFC的一个表参数传值 没有解决方案吗?
- 怎样在windows98平台上运行带System.Data.SqlClient名字空间的程序?
- 急!!!!winform 运行时不显示窗体
- 如何让Combol box中的文本只读即不可编辑,光标不动,下拉不变?
- 请教:怎样判断sqlserver的查询是否找到满足条件的记录,比如已知查询语句是“select ...from ... where xxx=aaa”
- 如何用winform实现一个类似在.net开发环境里设置控件的属性的属性页?
- 关于控件!急!
- 征求C#的编码规范
- 一个远程收费系统的技术问题?
- 求救,在线给分
你的方法可以的 但是如果是这种情况
<?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>
<GetIDCardInfoResponse xmlns="http://tempuri.org/">
<GetIDCardInfoResult>string</GetIDCardInfoResult>
<GetIDCardInfoResult1>string111</GetIDCardInfoResult1>
<GetIDCardInfoResult2>string222</GetIDCardInfoResult2>
<GetIDCardInfoResult3>string333</GetIDCardInfoResult3>
<GetIDCardInfoResult4>string444</GetIDCardInfoResult4>
</GetIDCardInfoResponse>
<GetIDCardInfoResponse xmlns="http://tempuri.org/">
<GetIDCardInfoResult>rrrstring</GetIDCardInfoResult>
<GetIDCardInfoResult1>rrrstring111</GetIDCardInfoResult1>
<GetIDCardInfoResult2>rrrstring222</GetIDCardInfoResult2>
<GetIDCardInfoResult3>rrrstring333</GetIDCardInfoResult3>
<GetIDCardInfoResult4>rrrstring444</GetIDCardInfoResult4>
</GetIDCardInfoResponse>
</soap:Body>
</soap:Envelope>
用你的方法 好像只能取出来 第一个匹配的 我如果要取rrrstring111这个值怎么办?
哈哈 我已经试验成功了 谢谢你
SelectSingleNodes()只得到一个节点
我这样处理了 但是不行啊 直到问题出在那里么?
System.Xml.XmlNamespaceManager XNM=new XmlNamespaceManager(XD.NameTable);
XNM.AddNamespace("soap",@"http://schemas.xmlsoap.org/soap/envelope/");
//XNM.AddNamespace("xsi",@"http://www.w3.org/2001/XMLSchema-instance");
//XNM.AddNamespace("xsd",@"http://www.w3.org/2001/XMLSchema");
//XNM.AddNamespace("GetIDCardInfoResponse",@"http://tempuri.org/");
//Response.Write(XD["soap:Envelope"]["soap:Body"].LastChild["GetIDCardInfoResult"].InnerText);
XmlNode XN=XD.SelectSingleNode(@"soap:Envelope/soap:Body/GetIDCardInfoResponse[1]/GetIDCardInfoResult",XNM);
Response.Write(XN.InnerText);