0
我有以下XML:LinqToXml:解析字典
<Places Count='50'>
<Place ID='1' Row='1' Place='1' Type='1' Fragment='0'></Place>
<Place ID='2' Row='1' Place='2' Type='1' Fragment='0'></Place>
<Place ID='3' Row='1' Place='3' Type='2' Fragment='0'></Place>
<Place ID='4' Row='1' Place='4' Type='2' Fragment='0'></Place>
<Place ID='5' Row='1' Place='5' Type='2' Fragment='0'></Place>
//other tags
</Places>
我想Dictionary<int, int>
包含以下内容:
1,2 // 0 element in the Dictionary (type =1; count = 2)
2,3; // 1 element in the Dictionary (type =2; count = 3)
第一个参数是XML Type
,第二个参数是此类型的计数。
谢谢。
所以...你尝试过什么? –
我无法理解如何将它修改为Dictionary – user1260827