我试过但无法得到它?这是xml文件
<Root>
<Data>
<Keys>Key1, key2, key3, key4</Keys>
<FirstRow>Key1row1, Key2Row1, Key3Row1, Key4Row1</FirstRow>
<SecondRow>Key1Row2, Key2Row2, Key3Row2, Key4Row2</SecondRow>
<ThirdRow>Key1Row3, Key2Row3, Key2Row3, Key2Row3</ThirdRow>
and so on .........
</Data>
</Root>
我需要使用 Linq to XML:-
var data = from d in xDoc.Root.Element("Data")
select d;
foreach(var d in data)
{
...
}
我喜欢将逗号分隔的键值与逗号分隔的Rows 值进行 Md 数组映射。
Key1 key2 key3 key4
Key1row1 key2Row1 Key3Row1 Key4Row1
....