分布式项目“World Community Grid”能够获取详细的用户信息,例如:
<?xml version="1.0" encoding="UTF-8"?>
<MemberStatsWithTeamHistory>
<MemberStats>
<MemberStat>
<Name>makerofthings7</Name>
<MemberId>876300</MemberId>
<TeamId>0QGNJ4D832</TeamId>
<RegisterDate>2013-12-08</RegisterDate>
<LastResult>2013-12-11T11:58:51</LastResult>
<NumDevices>4</NumDevices>
<StatisticsTotals>
<RunTime>1290126</RunTime>
<RunTimeRank>415174</RunTimeRank>
<Points>61710</Points>
<PointsRank>293387</PointsRank>
<Results>175</Results>
<ResultsRank>282858</ResultsRank>
</StatisticsTotals>
<StatisticsAverages>
<RunTimePerDay>322532</RunTimePerDay>
<RunTimePerResult>7372</RunTimePerResult>
<PointsPerHourRunTime>172.19713423320002</PointsPerHourRunTime>
<PointsPerDay>15427.5</PointsPerDay>
<PointsPerResult>352.62857142857104</PointsPerResult>
<ResultsPerDay>43.75</ResultsPerDay>
</StatisticsAverages>
<Resource>
<Url>http://www.worldcommunitygrid.org/stat/viewMemberInfo.do?userName=makerofthings7&xml=true</Url>
<Description>makerofthings7</Description>
</Resource>
</MemberStat>
</MemberStats>
<TeamHistory>
<Team>
<Name>Ripple Labs</Name>
<TeamId>0QGNJ4D832 </TeamId>
<JoinDate>2013-12-08</JoinDate>
<StatisticsTotals>
<RunTime>688331</RunTime>
<Points>33548</Points>
<Results>99</Results>
</StatisticsTotals>
</Team>
</TeamHistory>
<MemberStatsByProjects>
<Project> <ProjectName>Mapping Cancer Markers</ProjectName>
<ProjectShortName>mcm1</ProjectShortName>
<RunTime>518163</RunTime>
<Points>22918</Points>
<Results>39</Results>
</Project> <Project> <ProjectName>The Clean Energy Project - Phase 2</ProjectName>
<ProjectShortName>cep2</ProjectShortName>
<RunTime>61555</RunTime>
<Points>3422</Points>
<Results>4</Results>
</Project> <Project> <ProjectName>FightAIDS@Home</ProjectName>
<ProjectShortName>faah</ProjectShortName>
<RunTime>710408</RunTime>
<Points>35370</Points>
<Results>132</Results>
</Project> </MemberStatsByProjects>
</MemberStatsWithTeamHistory>
我可以通过这里获得这个 XML:
http://www.worldcommunitygrid.org/verifyMember.do?name=makerofthings7&code=SECRET CODE HERE
然后从这个页面中提取每个人唯一的密码。
既然这是一个很好的理由,我想鼓励其他人使用这个 API 并“竞争”以获得治疗。
问题
如何获取此 XML 文件并将其转换为消费用户可以轻松使用的 C# 类?