将XML文件显示到Datagrid? [英] Display XML file to a Datagrid?
本文介绍了将XML文件显示到Datagrid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
是否可以在数据网格中显示现有的xml文件?
谢谢
Hello,
Is it possible to display an existing xml file in a datagrid?
Thanks
推荐答案
Ish,
这取决于XML文件是一个数据集(或者具有相同的格式,即
很容易看到,当有属性时,它不是普通数据集只有
元素)。
Cor
Ish,
That depends of that XML file is a dataset (Or has the same format, that is
easy to see, when there are attributes it is not a normal dataset has only
elements).
Cor
Ish,
这取决于XML文件是一个数据集(或者具有相同的格式,即
easy看,当有属性时,它不是普通数据集只有
元素。)
Cor
Ish,
That depends of that XML file is a dataset (Or has the same format, that is
easy to see, when there are attributes it is not a normal dataset has only
elements).
Cor
>
尝试这样的事情。
Dim ds作为新数据集
ds.ReadXml(" C:\ temp.xml")
DataGrid1.DataSource = ds.Tables(0)
Ken
-----------------------------
>
" Ish200 0" <是***** @ discussions.microsoft.com>在留言中写道
news:97 ********************************** @ microsof t.com ...
您好,
是否可以在数据网格中显示现有的xml文件?
谢谢
Hi,
Try something like this.
Dim ds As New DataSet
ds.ReadXml("C:\temp.xml")
DataGrid1.DataSource = ds.Tables(0)
Ken
-----------------------------
"Ish2000" <Is*****@discussions.microsoft.com> wrote in message
news:97**********************************@microsof t.com...
Hello,
Is it possible to display an existing xml file in a datagrid?
Thanks
这篇关于将XML文件显示到Datagrid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文