首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > XML SOAP >

net怎么获取webservice返回的xml中节点的值

2013-01-09 
net怎样获取webservice返回的xml中节点的值.net怎样获取webservice返回的xml中节点的值 并绑定到dropdownl

net怎样获取webservice返回的xml中节点的值
.net怎样获取webservice返回的xml中节点的值 并绑定到dropdownlist中

[解决办法]
能详细说一下吗  谢谢

这是我通过webservice 返回的xml
<?xml version="1.0" encoding="utf-8" ?> 
- <ArrayOfManufacturersModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://wheelwizards.net/tf_service/">
- <ManufacturersModel>
  <ManufacturerID>Manu_Acura</ManufacturerID> 
  <ManufacturerName>Acura USA</ManufacturerName> 
  <ChangeDate>RESTRICTED</ChangeDate> 
  </ManufacturersModel>
- <ManufacturersModel>
  <ManufacturerID>Manu_AIXAM</ManufacturerID> 
  <ManufacturerName>Aixam</ManufacturerName> 
  <ChangeDate>RESTRICTED</ChangeDate> 
  </ManufacturersModel>
- <ManufacturersModel>
  <ManufacturerID>MANU_ALFA_ROMEO</ManufacturerID> 
  <ManufacturerName>Alfa Romeo</ManufacturerName> 
  <ChangeDate>RESTRICTED</ChangeDate> 
  </ManufacturersModel>
...

C# Code

string url = "ddd";
            HttpWebRequest webrequest = (HttpWebRequest)HttpWebRequest.Create(url);
            HttpWebResponse webreponse = (HttpWebResponse)webrequest.GetResponse();
            Stream stream = webreponse.GetResponseStream();
            byte[] rsByte = new Byte[webreponse.ContentLength];  stream
            aa = System.Text.Encoding.UTF8.GetString(rsByte, 0, rsByte.Length).ToString();
            Response.Write(aa);

热点排行