这里是XML我有一个文件:我如何将XML到词典列表用C#在Windows Phone 7
特别注意: 这是Windows Phone 7的,不是一般的C#问题
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<item>
<date>01/01</date>
<word>aberrant</word>
<def>straying from the right or normal way</def>
</item>
<item>
<date>01/02</date>
<word>Zeitgeist</word>
<def>the spirit of the time.</def>
</item>
</rss>
我需要它在Dictionary
对象的List
(又名数组)。每个Dictionary
代表<item>
。像<word>
这样的每个元素是key
,其类型为string
,每个值像“Zeitgeist”是value
,其类型为string
。
有没有简单的方法来做到这一点?我来自Objective-C和iOS,所以这对于.NET和C#来说是全新的。
如何将Linq添加到我的项目中?使用System.Xml.Linq添加给我一个错误,说它不在程序集中。谢谢您的帮助。 – 2011-12-13 22:46:02