62,074
社区成员
发帖
与我相关
我的任务
分享
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header></env:Header><env:Body><com:locationSearchResponse xmlns:com="com.hrs.soap.hrs"><locationSearchResponse><responseTimeMillis>40</responseTimeMillis><resultCode>0</resultCode><locations><locationName>北京火车站</locationName><locationISO3Language>chn</locationISO3Language><iso3Country>chn</iso3Country><locationId>48979</locationId><poiId>18375</poiId><geoPosition><latitude>39.90289</latitude><longitude>116.4207</longitude></geoPosition></locations><locations><locationName>北京首都国际机场</locationName><locationISO3Language>chn</locationISO3Language><iso3Country>chn</iso3Country><locationId>48979</locationId><poiId>18373</poiId><geoPosition><latitude>40.07941</latitude><longitude>116.58707</longitude></geoPosition></locations><locations><locationName>北京展览馆</locationName><locationISO3Language>chn</locationISO3Language><iso3Country>chn</iso3Country><locationId>48979</locationId><poiId>18374</poiId><geoPosition><latitude>39.93774</latitude><longitude>116.33805</longitude></geoPosition></locations></locationSearchResponse></com:locationSearchResponse></env:Body></env:Envelope>
DataSet xmlDataSet = new DataSet();
xmlDataSet.ReadXml(Server.MapPath("~/App_Data/locations.xml"));
DataTable dt = xmlDataSet.Tables[0];
DataSet getds(string path)
{
FileSteam fs=New FileStrea(Server.MapPath(path),FileMode.Open);
XmlDataDocument doc=New XmlDataDocument();
doc.DataSet.ReadXml(New StreamReader(fs));
DataSet ds=New DataSet();
ds=doc.DataSet;
Return ds;
}
''' <summary>
''' 根据XML文件返回表
''' </summary>
''' <param name="id"></param>
''' <param name="path"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function getdata(ByVal path As String) As DataView
Dim dt As DataTable = New DataTable()
Dim dv As DataView = New DataView()
Dim stream As FileStream = New FileStream(Server.MapPath(path), FileMode.Open)
Dim doc As XmlDataDocument = New XmlDataDocument
doc.DataSet.ReadXml(New StreamReader(stream))
dt = doc.DataSet.Tables(0)
dv = dt.DefaultView
stream.Close()
Return dv
End Function