本文介绍了如何从XML文件读取值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下是我的xml文件.
Hi,
Below is my xml file.
<Programme id="000115671767" title="Have A Laugh : Donald&apos;s Tire Trouble">
<Period end="2012-11-05T19:40:00Z" start="2012-11-05T19:30:00Z" />
<EpgDescription locale="hi_IN">
<EpgElement key="Title">Have A Laugh : Donald&apos;s Tire Trouble</EpgElement>
<EpgElement key="Short_Description">Come join your favourite Disney characters for some fun and laughter.</EpgElement>
<EpgElement key="Description">Come join your favourite Disney characters for some fun and laughter.</EpgElement>
</EpgDescription>
<EpgDescription locale="en_GB">
<EpgElement key="Title">Have A Laugh : Donald&apos;s Tire Trouble</EpgElement>
<EpgElement key="Short_Description">Come join your favourite Disney characters for some fun and laughter.</EpgElement>
<EpgElement key="Description">Come join your favourite Disney characters for some fun and laughter.</EpgElement>
</EpgDescription>
</Programme>
我想从EpgElement节点(突出显示)中读取值,并想使用linq将其存储在asp.net中的3个不同变量中.
有人告诉我如何在linq中做到这一点吗?
提前谢谢.
Ranjeet
I want to read the value from EpgElement node (Highlighted) and want to store in 3 different variable in asp.net using linq.
Is anyone tell me how to do that in linq.
Thanks in advance.
Ranjeet
推荐答案
这篇关于如何从XML文件读取值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!