<?xml version="1.0" encoding="gb2312"?>
<files maxid ="002">
<file>
<name>新建文件夹</name>
<id>001</id>
<nodetype>02</nodetype>
<author>system</author>
<parentid>-1</parentid>
</file>
<file>
<name>system2</name>
<id>002</id>
<parentid>-1</parentid>
<nodetype>02</nodetype>
</file>
</files>
当我用如下代码读入并绑定到datagrid发现
string mypath = Server.MapPath("A.xml");
DataSet myds = new DataSet();
myds.ReadXml(mypath);
DataGrid1.DataSource = myds;
DataGrid1.DataBind();
绑定后显示的内容确是
DataSet myds = new DataSet();
myds.ReadXml(mypath);
DataGrid1.DataSource = myds;
DataGrid1.DataBind();
files_id |
maxid |
001 |
002 |