C#这种方法可以读取xml文件吗?
DataSet ds = new DataSet();
FileStream fs = null;
StreamReader streamXm = null;
string strfile = null;
strfile = Server.MapPath("XMLFile.xml");
fs = new FileStream(strfile,FileMode.Open,FileAccess.Read);
streamXm = new StreamReader(fs);
ds.ReadXml(streamXm);
DataGrid1.DataSource = ds.Tables[0].DefaultView;
DataGrid1.DataBind();