asp.net的XML阅读器属性

时间:2016-09-28 08:34:34

标签: asp.net xml attributes xmlreader

我想读一个xml文件。并且我需要它的所有属性。

高时间标签重复36次

<?xml version="1.0" encoding="utf-8"?>
<weatherdata>
  <!-- ... -->
  <forecast>
    <tabular>
      <time from="2016-09-28T15:30:00" to="2016-09-28T18:30:00" period="2">
        <!-- Valid from 2016-09-28T15:30:00 to 2016-09-28T18:30:00 -->
        <symbol number="1" numberEx="1" name="Clear sky" var="01d" />
        <precipitation value="0" />
        <!-- Valid at 2016-09-28T15:30:00 -->
        <windDirection deg="225.9" code="SW" name="Southwest" />
        <windSpeed mps="7.5" name="Moderate breeze" />
        <temperature unit="celsius" value="24" />
        <pressure unit="hPa" value="1007.5" />
      </time>
      <time from="2016-09-28T18:30:00" to="2016-09-29T00:30:00" period="3">
        <!-- Valid from 2016-09-28T18:30:00 to 2016-09-29T00:30:00 -->
        <symbol number="3" numberEx="3" name="Partly cloudy" var="mf/03n.89" />
        <precipitation value="0" />
        <!-- Valid at 2016-09-28T18:30:00 -->
        <windDirection deg="219.1" code="SW" name="Southwest" />
        <windSpeed mps="4.6" name="Gentle breeze" />
        <temperature unit="celsius" value="19" />
        <pressure unit="hPa" value="1008.5" />
      </time>

0 个答案:

没有答案