如何在asp.net c#中将xml字符串转换为DataTable [英] how to convert xml string to DataTable in asp.net c#

查看:65
本文介绍了如何在asp.net c#中将xml字符串转换为DataTable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个XML文件。我想将其转换为DataTable。我该怎么办?





1)删除了大量无用的XML文件。 2)英语改进了。[/ edit]

I have an XML file. I want to convert this to a DataTable. How do I do this, please?


[edit]1) Big and useless chunk of XML file removed. 2) English improved.[/edit]

推荐答案

你需要编辑这个并删除xml的转储(大概是希望有人会写一些代码你)。



你有什么尝试?那是怎么回事?您遇到了什么问题?
You need to edit this and remove the dump of xml (presumably in the hope that someone will just write some code for you).

What have you tried? How did that work out? What problems did you encounter?


Google。

精彩的网站。

您输入一个问题,它会给您答案。 />
例如,我尝试了使用带有数据表c#的XML,并且顶级站点在MSDN上标题为从XML加载数据集!快速浏览一下,它会告诉您如何从XML文件加载DataTable!尝试一下 - 这并不困难,您只需在浏览器的地址栏中键入www.google.com即可。 :doh:



查看此网页可提供说明,说明甚至代码!不可否认,这是在VB,但它并不是很难理解...

这里 [ ^ ]。
Google.
Wonderful site.
You type a question, it gives you answers.
For example, I tried "use XML with datatable c#" and the top site was titled "Loading a DataSet from XML" on MSDN! A quick look, and it tells you how to load a DataTable from an XML file! Try it - it's not difficult, all you have to do is type "www.google.com" in the address bar of your browser, and off you go. :doh:

Looking at this web page gives descriptions, instructions, and even code! Admittedly, it's in VB, but it's not exactly difficult to understand...
Look here[^].


这篇关于如何在asp.net c#中将xml字符串转换为DataTable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆