2 xilashenhua001 xilashenhua001 于 2014.05.08 10:03 提问

C#读取XML并绑定Treeview

最近做毕业设计遇到要在winform中读取XML文件并绑定到treeview或者listview中哪位大神帮帮忙啊
我的XML文件内容如下:



24.06
2013-11-07T08:45:19.000000Z
053089868030_03_P002
20300100F90B5B00
ORStandard2A
MS1
None
7741
8849
LV2A
Standard
1
Corrected
Off
16
None
GeoTIFF

1.209472617400000e+02
3.123262010000000e+01
1.217000000000000e+01
1.211329722800000e+02
3.123545164000000e+01
1.217000000000000e+01
1.211357090000000e+02
3.109585002000000e+01
1.217000000000000e+01
1.209502702400000e+02
3.109303393000000e+01
1.217000000000000e+01
1.260825000000000e-02
5.430000000000000e-02
14


1.209472617400000e+02
3.123262010000000e+01
1.217000000000000e+01
1.211329722800000e+02
3.123545164000000e+01
1.217000000000000e+01
1.211357090000000e+02
3.109585002000000e+01
1.217000000000000e+01
1.209502702400000e+02
3.109303393000000e+01
1.217000000000000e+01
9.713071000000000e-03
6.300000000000000e-02
14


1.209472617400000e+02
3.123262010000000e+01
1.217000000000000e+01
1.211329722800000e+02
3.123545164000000e+01
1.217000000000000e+01
1.211357090000000e+02
3.109585002000000e+01
1.217000000000000e+01
1.209502702400000e+02
3.109303393000000e+01
1.217000000000000e+01
1.103623000000000e-02
5.740000000000000e-02
10


1.209472617400000e+02
3.123262010000000e+01
1.217000000000000e+01
1.211329722800000e+02
3.123545164000000e+01
1.217000000000000e+01
1.211357090000000e+02
3.109585002000000e+01
1.217000000000000e+01
1.209502702400000e+02
3.109303393000000e+01
1.217000000000000e+01
1.224380000000000e-02
9.890000000000000e-02
10


WV02
FullSwath
Forward
1030010029694F00
2013-11-07T03:05:20.975428Z
5.000000000000000e+03
2.000000000000000e-04
2.075000000000000e+00
2.093000000000000e+00
2.082000000000000e+00
1.963000000000000e+00
1.966000000000000e+00
1.964000000000000e+00
2.022000000000000e+00
4.492000000000000e+01
5.720000000000000e+01
1.690000000000000e+02
1.690000000000000e+02
1.690000000000000e+02
4.190000000000000e+01
4.210000000000000e+01
4.200000000000000e+01
1.913000000000000e+02
1.914000000000000e+02
1.914000000000000e+02
6.940000000000001e+01
7.020000000000000e+01
6.980000000000000e+01
-1.790000000000000e+01
-1.760000000000000e+01
-1.780000000000000e+01
-6.000000000000000e-01
-4.000000000000000e-01
-5.000000000000000e-01
1.780000000000000e+01
1.780000000000000e+01
1.780000000000000e+01
3.000000000000000e+00
0.000000000000000e+00
CC
R
R
21410


2013-11-07T03:05:25.854374Z
2013-11-07T03:05:25.854374Z
WE
6.378137000000000e+06
2.982572235630000e+02

0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00

UTM
1
51
N

0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00

M
3.044909999799400e+05
3.457198999999050e+06
0.000000000000000e+00
2.000000000000000e+00
2.000000000000000e+00
2.000000000000000e+00
3.044909999799400e+05
3.457198999999050e+06
1.217000000000000e+01
3.221869999896400e+05
3.457198999999170e+06
1.217000000000000e+01
3.221869999897900e+05
3.441718999999150e+06
1.217000000000000e+01
3.044909999802400e+05
3.441718999999030e+06
1.217000000000000e+01
Base Elevation
1.217000000000000e+01
0

2个回答

feiyun0112
feiyun0112   Rxr 2014.05.09 13:13

如何填充与 Visual C# 2005年或 Visual C#.NET 中的 XML 数据的树视图控件
http://support.microsoft.com/kb/317597

yourwise
yourwise   2014.06.12 16:15

这也不象标准xml格式啊。
DataSet ds = new DataSet();

// 读取数据
ds.ReadXml("./bookstore.xml");
用dataset绑定就行了

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!