xml到datatable xml像这样 [英] xml to datatable xml like this
本文介绍了xml到datatable xml像这样的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这样的xml
i have xml like this
<root>
<name>ganesh</name>
<name>Lokesh</name>
<name>fg</name>
<name>werwer</name>
<name>ganweresh</name>
<email>gs@gmail.com</email>
<email>gs@gmail.com</email>
<email>gfgs@gmail.com</email>
<email>gsfg@gmail.com</email>
<email>gfds@gmail.com</email>
</root>
推荐答案
这不是有效的XML.
DataTable
有一个称为ReadXml
的方法.
如果提供有效 Xml文件的路径,它将自动读取该文件,以供您根据给定的架构生成列和行.
This is not a valid XML.
DataTable
has a method calledReadXml
.
If you provide path to a valid Xml file, it will read it automatically for you generating columns and rows as per the given schema.
这篇关于xml到datatable xml像这样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文