在C#中读取XML文件 [英] Reading XML file in C#
本文介绍了在C#中读取XML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法使用XML阅读器解析以下XML。
需要一些相同的指导。
XML
问候,
Swayam
I am not able to parse the following XML using XML reader.
Need some guidance on the same.
XML
Regards,
Swayam
推荐答案
此处描述的方法: http:/ /support2.microsoft.com/kb/307643/en-us [ ^ ]工作得很好。
The method described here: http://support2.microsoft.com/kb/307643/en-us[^] works just fine.
有很多方法可以解析XML中的数据,所以我在这里描述一种最简单的方法。
DataTable dt = new DataTable();
dt.ReadXml(mapPath(you_Url));
现在你可以分配,或者你可以使用dataTable dt执行任何操作。
there are lots of way to parse data from XML so here i am describing one of the easiest method.
DataTable dt=new DataTable();
dt.ReadXml(mapPath("you_Url"));
now you can assign or you can perform any operation by using dataTable dt.
这篇关于在C#中读取XML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文