1
我目前正在與該XML的工作(這是一個小的子集)分組:的LINQ to XML與和
<?xml version="1.0" encoding="UTF-8"?>
<orders>
<order>
<customer><![CDATA[1035]]></customer>
<total><![CDATA[10]]></total>
</order>
<order>
<customer><![CDATA[1036]]></customer>
<total><![CDATA[5.6]]></total>
</order>
<order>
<customer><![CDATA[1035]]></customer>
<total><![CDATA[5.6]]></total>
</order>
</orders>
我試圖找出是否有一種方法來組這個由客戶和求和總。
當我通過分組循環我會:
customer 1035 with a total of 15.6
customer 1036 with a total of 5.6