-1
解析xml我有一個非常奇怪和奇怪的XML(這不是我的錯),我想從它獲得一些信息與C#和LINQ。 XML是:使用xdocument解析xml與C#使用xdocument
<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,且點對於每個競爭者whic是「值」,但在一個週期我可以有更多點(「價值觀」)對於一個競爭對手,所以我必須以某種方式總結ti,我正在與這個一起努力,所以任何建議或幫助任何人?
讀書給了我們更多的XML的,所以我們有一個更好的線索。 – Davio
你是否缺少一些xml? – esskar
有一個原因,有一個預覽 - 所以你可以看到你要發佈.. – t3hn00b