从XML文件读取C#中的多个Xelements

时间:2018-11-02 16:28:04

标签: c# xml xelement

我目前正在寻找一种方法,可以将多个XElement的属性读取到数组中,但是我不知道该怎么做。 我的XML文件如下所示:

<transaction date="02.11.2018" product="product1" price="0,1$" amount="1" profit="0,1$" />
<transaction date="02.11.2018" product="product2" price="1$" amount="1" profit="1€" />
<transaction date="02.11.2018" product="product1" price="1$" amount="3" profit="3$" />

1 个答案:

答案 0 :(得分:-2)

然后创建KeyValuePair

SyncEnd_Event()