C#中把sql数据库的数据以树的形式写入xml文件再从xml显示到treeview上
比如有一个数据库我想显示到xml上时是以下形式:
- <Authors_Table>
- <authors>
<ID>172-32-1176</ID>
<xing>wang</xing>
<name>jing</name>
<city>shanghai</city>
<order>true</order>
</authors>
- <authors>
<ID>172-32-1177</ID>
<xing>Liang</xing>
<name>Ming</name>
<city>hangzhou</city>
<order>true</order>
</authors>
</Authors_Table>
然后再显示到treeview上是下面的形式
+Authors_Table
+authors
-ID
-xing
-name
-city
-order
-ID
-xing
-name
-city
-order
+authors>
-ID
-xing
-name
-city
-order
-ID
-xing
-name
-city
-order
我把我的分全压上了。。大哥们帮帮忙啊。代码哦