title: Bind XML nested node Data into Repeater Control in ASP.NET
body: <p>I have consume <a href="http://openweathermap.org" rel="nofollow">openweathermap API</a> in xml format. In this XML data node are nested and unordered. I don't know how to bind data in repeater control.</p>
  
  <p>Here is my C# code</p>
  
  <pre><code>using System.Net;
  
      protected void GetWeatherInfo()
      {
          string appId = "API KEY";
          string url = string.Format("http://api.openweathermap.org/data/2.5/forecast/daily?q=London&amp;units=metric&amp;mode=xml&amp;cnt=2&amp;APPID={0}", appId);
          using (WebClient client = new WebClient())
          {
              string xmlData= client.DownloadString(url);
              RepDetails.DataSource = xmlData;
              RepDetails.DataBind();
          }
      }
  </code></pre>
  
  <p>Coming data from url</p>
  
  <pre><code>&lt;weatherdata&gt;
  - &lt;location&gt;
          &lt;name&gt;London&lt;/name&gt; 
          &lt;type /&gt; 
          &lt;country&gt;GB&lt;/country&gt; 
          &lt;timezone /&gt; 
          &lt;location altitude="0" latitude="51.50853" longitude="-0.12574" geobase="geonames" geobaseid="2643743" /&gt; 
    &lt;/location&gt;
    &lt;credit /&gt; 
  - &lt;meta&gt;
          &lt;lastupdate /&gt; 
          &lt;calctime&gt;0.0278&lt;/calctime&gt; 
          &lt;nextupdate /&gt; 
    &lt;/meta&gt;
    &lt;sun rise="2015-12-16T08:00:32" set="2015-12-16T15:51:44" /&gt; 
  - &lt;forecast&gt;
        - &lt;time day="2015-12-16"&gt;
                &lt;symbol number="500" name="light rain" var="10d" /&gt; 
                &lt;precipitation value="1.22" type="rain" /&gt; 
                &lt;windDirection deg="250" code="WSW" name="West-southwest" /&gt; 
                &lt;windSpeed mps="8.54" name="Fresh Breeze" /&gt; 
                &lt;temperature day="13.11" min="12.09" max="13.2" night="12.22" eve="13.02" morn="12.63" /&gt; 
                &lt;pressure unit="hPa" value="1023.73" /&gt; 
                &lt;humidity value="94" unit="%" /&gt; 
                &lt;clouds value="broken clouds" all="64" unit="%" /&gt; 
          &lt;/time&gt;
        - &lt;time day="2015-12-17"&gt;
                &lt;symbol number="500" name="light rain" var="10d" /&gt; 
                &lt;precipitation value="0.5" type="rain" /&gt; 
                &lt;windDirection deg="199" code="SSW" name="South-southwest" /&gt; 
                &lt;windSpeed mps="7.17" name="Moderate breeze" /&gt; 
                &lt;temperature day="12.86" min="11.16" max="12.87" night="11.16" eve="12.48" morn="11.61" /&gt; 
                &lt;pressure unit="hPa" value="1019.9" /&gt; 
                &lt;humidity value="89" unit="%" /&gt; 
                &lt;clouds value="broken clouds" all="68" unit="%" /&gt; 
         &lt;/time&gt;
    &lt;/forecast&gt;
    &lt;/weatherdata&gt;
  </code></pre>
  
  <p>So, according to my requirement i need sun and time node data but i don't know how to manage relationship between parent and child node data in repeater control.</p>
  
  <pre><code>&lt;itemTemplate&gt;
        &lt;asp:Label ID="lblDate" runat="server" Text='&lt;%#Eval("sun.rise") %&gt;' Font-Bold="true" /&gt;
        &lt;asp:Label ID="lblComment" runat="server" Text='&lt;%#Eval("time.temprature.day") %&gt;' /&gt;
  &lt;/itemTemplate&gt;
  </code></pre>