我需要分别获取inbound
交易和outbound
交易的计数。我已经尝试了我所知道的一切,但没有任何效果。这是 XML:
<?xml version="1.0" encoding="utf-8"?>
<records>
<inbound>
<transaction>
<customerID>0002</customerID>
<customerName>bob</customerName>
</transaction>
<transaction>
<customerID>0003</customerID>
<customerName>harry</customerName>
</transaction>
.
.
.
<transaction>
<customerID>0250</customerID>
<customerName>joe</customerName>
</transaction>
</inbound>
<outbound>
<transaction>
<customerID>0002</customerID>
<customerName>bob</customerName>
</transaction>
<transaction>
<customerID>0003</customerID>
<customerName>harry</customerName>
</transaction>
.
.
.
<transaction>
<customerID>0175</customerID>
<customerName>frank</customerName>
</transaction>
</outbound>
</records>
这需要在 C# 和 LINQ 中。谢谢你的帮助。