first step:
build a XML.xml
<Menu>
<MenuItem>
<Food>
French Toast
</Food>
<Price>
11.21
</Price>
</MenuItem>
<MenuItem>
<Food>
tomato
</Food>
<Price>
10
</Price>
</MenuItem>
</Menu>
NEXT STEP
use dataset to get xml (doxml.aspx)
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
DataSet ds=new DataSet ();
ds.ReadXml (MapPath("XML.xml"));
DataGrid1.DataSource =ds;
DataGrid1.DataBind ();
}
本文地址:http://com.8s8s.com/it/it43411.htm