积极答复者
.NET xml 大文件如何快速转换成 DataTable?或者....

问题
答案
-
-
DataTable ReadXml 如何?
补充:
正解,不过必须要符合DataTable的格式,否则会读取错误。
建议随便弄一个DataTable填充数据,然后WriteToXml观察格式,修改原先的xml即可。
If you think one reply solves your problem, please mark it as An Answer, if you think someone's reply helps you, please mark it as a Proposed Answer
Help by clicking:
Click here to donate your rice to the poor
Click to Donate
Click to feed Dogs & Cats
Found any spamming-senders? Please report at: Spam Report- 已标记为答案 Barry WangModerator 2013年9月3日 2:22
-
几万行的数据也不算是非常大吧,你可以尝试一下Linq to Xml,或者XmlSerializer读取其中的数据到内存之后转换成DataTable,或者像DroidXgnaW所说的,使用DataTable.ReadXml,然后比较一下处理速度,选择最优方案。
Caillen
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.- 已标记为答案 Barry WangModerator 2013年9月3日 2:22
全部回复
-
-
DataTable ReadXml 如何?
补充:
正解,不过必须要符合DataTable的格式,否则会读取错误。
建议随便弄一个DataTable填充数据,然后WriteToXml观察格式,修改原先的xml即可。
If you think one reply solves your problem, please mark it as An Answer, if you think someone's reply helps you, please mark it as a Proposed Answer
Help by clicking:
Click here to donate your rice to the poor
Click to Donate
Click to feed Dogs & Cats
Found any spamming-senders? Please report at: Spam Report- 已标记为答案 Barry WangModerator 2013年9月3日 2:22
-
几万行的数据也不算是非常大吧,你可以尝试一下Linq to Xml,或者XmlSerializer读取其中的数据到内存之后转换成DataTable,或者像DroidXgnaW所说的,使用DataTable.ReadXml,然后比较一下处理速度,选择最优方案。
Caillen
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.- 已标记为答案 Barry WangModerator 2013年9月3日 2:22