阅读背景:

如何使用c#对每个实用程序(XML数据)中的所有城市的总体进行求和?

来源:互联网 

I'm having following xml file

下面是xml文件

<?xml version="1.0" encoding="UTF-8"?>
<DetailedUtilityCollection SchemaVersion="1.0">
<DetailedUtility UtilityId="720" UtilityName="Chelan County Public Utility District" CountryCode="US" StateCode="WA">
  <Rate Id="2350" Name="Residential Service (Schedule 1)" Sector="Residential" Metering="OptionalNetMetering" IsDefault="true" IsTimeOfUse="false" />
  <Rate Id="2351" Name="General Service - Nondemand (Schedule 2)" Sector="Commercial" Metering="OptionalNetMetering" IsDefault="true" IsTimeOfUse="false" />
  <Rate Id="2352" Name="General Service - Demand (Schedule 2)" Sector="Commercial" Metering="OptionalNetMetering" IsDefault="false" IsTimeOfUse="false" />
  <City Name="Cashmere" Population="7233">
     <CityLocation Zip="98815" Lat="47.53593" Lng="-120.494571" />
  </City>
  <City Name="Chelan" Population="6394">
     <CityLocation Zip="98816" Lat="47.901204" Lng="-120.139618" />
  </City>
  <City Name="Entiat" Population="1953">
     <CityLocation Zip="98822" Lat="47.885389" Lng="-120.47078" />
  </City>
  <City Name="Leavenworth" Population="6504">
     <CityLocation Zip="98826" Lat="47.82259" Lng="-120.825267" />
  </City>
  <City Name="Wenatchee" Population="40977">
     <CityLocation Zip="98801" Lat="47.451974" Lng="-120.330783" />
     <CityLocation Zip="98802" Lat="47.494001" Lng="-120.193856" />
     <CityLocation Zip="98807" Lat="47.4236" Lng="-120.3092" />
  </City>
  <City Name="West Wenatchee" Population="40977">
     <CityLocation Zip="98801" Lat="47.451974" Lng="-120.330783" />
  </City>
  </DetailedUtility>
  <DetailedUtility UtilityId="721" UtilityName="Clallam County PUD" CountryCode="US" StateCode="WA">
  <Rate Id="2353" Name="General Service - Residential, Farm (Schedule E-4)" Sector="Residential" Metering="OptionalNetMetering" IsDefault="true" IsTimeOfUse="false" />
  <Rate Id="2354" Name="General Service - Commercial (Schedule E-4)" Sector="Commercial" Metering="OptionalNetMetering" IsDefault="true" IsTimeOfUse="false" />
  <Rate Id="2355" Name="Large Power Service (Schedule E-5)" Sector="Commercial" Metering="OptionalNetMetering" IsDefault="false" IsTimeOfUse="false" />
  <City Name="Forks" Population="6261">
     <CityLocation Zip="98331" Lat="47.851473" Lng="-124.28411" />
  </City>
  <City Name="Neah Bay" Population="1414">
     <CityLocation Zip="98357" Lat="48.332856" Lng="-124.639563" />
  </City>
  <City Name="Port Angeles" Population="22230">
     <CityLocation Zip="98362" Lat="47.99614" Lng="-123.38281" />
     <CityLocation Zip="98363" Lat="48.017263" Lng="-123.824588" />
  </City>
  <City Name="Port Angeles East" Population="-1" />
  <City Name="Sequim" Population="26856">
     <CityLocation Zip="98382" Lat="48.025762" Lng="-123.061784" />
  </City>
  </DetailedUtility>
  </DetailedUtilityCollection>
<?xm



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: