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);