我有一个非常奇怪的 xml(这不是我的错),我想用 c# 和 linq 从中获取一些信息。XML 是:
<Match BeginTime="2012-05-16T13:21:56.6737546+02:00" EndTime="2012-05-16T13:24:04.3994176+02:00" Winner="2">
<Period Number="1" MaximumDuration="PT2M" BeginTime="2012-05-16T13:21:56.6737546+02:00"
EndTime="2012-05-16T13:22:25.3952338+02:00" MatchDuration="PT2M" Winner="2">
<Point Competitor="1" Value="1" MatchTime="PT6.5178048S" Time="2012-05-16T13:22:03.6018269+02:00" />
<Point Competitor="2" Value="2" MatchTime="PT1M57S" Time="2012-05-16T13:22:21.4017106+02:00" />
</Period>
<Pause MaximumDuration="PT30S" AutomaticallyStartTime="true" BeginTime="2012-05-16T13:22:25.3952338+02:00"
EndTime="2012-05-16T13:22:36.1092608+02:00" />
<Period Number="2" MaximumDuration="PT2M" BeginTime="2012-05-16T13:22:37.2592378+02:00"
EndTime="2012-05-16T13:23:33.0777937+02:00" MatchDuration="PT2M" Winner="2">
<Point Competitor="2" Value="3" MatchTime="PT10.2121084S" Time="2012-05-16T13:22:47.4932385+02:00" />
<Point Competitor="1" Value="2" MatchTime="PT15.2950443S" Time="2012-05-16T13:22:52.5951376+02:00" />
<Point Competitor="2" Value="2" MatchTime="PT41.1295728S" Time="2012-05-16T13:23:18.3988393+02:00" />
</Period>
<Pause MaximumDuration="PT30S" AutomaticallyStartTime="true" BeginTime="2012-05-16T13:23:33.0777937+02:00" />
<Period Number="3" MaximumDuration="PT2M" />
</Match>
如您所见,我有 3 个时期,在每个时期中,我的竞争对手编号为 1 或 2,并且每个竞争对手的积分都在“价值”中,但在一个时期内,我可以为一个竞争对手获得更多积分(“价值”)所以我必须以某种方式总结 ti,我正在努力解决这个问题,所以有什么建议或帮助任何人吗?