Note that there are some explanatory texts on larger screens.

plurals
  1. POReading XML / RSS in .Net using System.Data.DataSet?
    text
    copied!<p>I really have not worked much with XML and I would appreciate some help.</p> <p>I am trying to read an RSS feed from WeatherBug</p> <p>I found some sample code here:</p> <p><a href="http://geekswithblogs.net/thibbard/archive/2006/01/13/65764.aspx" rel="nofollow">http://geekswithblogs.net/thibbard/archive/2006/01/13/65764.aspx</a></p> <p>Where they are using System.Data.DataSet to read the XML feed.</p> <p>(They are using VBasic I am using VC#)</p> <p>Here is a sample of the XML I am trying to read:</p> <p><a href="http://api.wxbug.net/getLiveCompactWeatherRSS.aspx?ACode=A5333948364&amp;zipcode=80918&amp;unittype=0&amp;OutputType=1" rel="nofollow">http://api.wxbug.net/getLiveCompactWeatherRSS.aspx?ACode=A5333948364&amp;zipcode=80918&amp;unittype=0&amp;OutputType=1</a></p> <p>In the code example they get the wind speed as follows:</p> <p>_wind = DS.Tables("wind-speed").Rows(0).Item("wind-speed_Text")</p> <p>How do I know what to specify for each of the index values? I think I understand how they determined to specify wind-speed but how did they determine how to specify wind-speed_Text?</p> <p>I can see the values in my debugger using:</p> <p>m_ds.Tables["wind-speed"].Rows[0].ItemArray</p> <p>I can see 3 values. "MPH", "3" and 0.</p> <p>MPH would be the units. "3" would be the speed. Not sure what 0 is.</p> <p>And how would I access the value at aws:WebURL?</p> <p>And I am only seeing 8 tables.But there are more values than that. By poking around with the debugger, I found those URLs in the Weather table along with the values for wind-direction and gust-direction.</p> <p>I thought I had the whole table thing nailed down but there seems to be no rhyme nor reason to it.</p> <p>Can anyone put me on the right path? Basically I just need to know how to figure out how to find stuff in the DataTables based on what I am seeing in the XML. </p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload