Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7815891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:40:13+00:00 2026-06-02T05:40:13+00:00

I really have not worked much with XML and I would appreciate some help.

  • 0

I really have not worked much with XML and I would appreciate some help.

I am trying to read an RSS feed from WeatherBug

I found some sample code here:

http://geekswithblogs.net/thibbard/archive/2006/01/13/65764.aspx

Where they are using System.Data.DataSet to read the XML feed.

(They are using VBasic I am using VC#)

Here is a sample of the XML I am trying to read:

http://api.wxbug.net/getLiveCompactWeatherRSS.aspx?ACode=A5333948364&zipcode=80918&unittype=0&OutputType=1

In the code example they get the wind speed as follows:

_wind = DS.Tables(“wind-speed”).Rows(0).Item(“wind-speed_Text”)

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?

I can see the values in my debugger using:

m_ds.Tables[“wind-speed”].Rows[0].ItemArray

I can see 3 values. “MPH”, “3” and 0.

MPH would be the units. “3” would be the speed. Not sure what 0 is.

And how would I access the value at aws:WebURL?

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.

I thought I had the whole table thing nailed down but there seems to be no rhyme nor reason to it.

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.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T05:40:14+00:00Added an answer on June 2, 2026 at 5:40 am

    Quick and easy:

    XDocument doc = XDocument.Load("http://api.wxbug.net/getLiveCompactWeatherRSS.aspx?ACode=A5333948364&zipcode=80918&unittype=0&OutputType=1");
                XNamespace ns = "http://www.aws.com/aws";
                var webUrl = doc.Element(ns + "weather").Element(ns + "WebURL").Value;
                var wind = doc.Element(ns + "weather").Element(ns + "wind-speed").Value; 
    

    You can also use LINQ:

    XDocument doc = XDocument.Load("http://api.wxbug.net/getLiveCompactWeatherRSS.aspx?ACode=A5333948364&zipcode=80918&unittype=0&OutputType=1");
                XNamespace ns = "http://www.aws.com/aws";
                var v = from d in doc.Elements(ns + "weather") select new { WebUrl = d.Element(ns + "WebURL").Value, WindSpeed = d.Element(ns + "wind-speed").Value};
                foreach (var c in v)
                {
                    Console.WriteLine(c.WebUrl + "--" + c.WindSpeed);
                }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a Java project for class and have not worked much
I apologize if this is a really beginner question, but I have not worked
I'm not really debating which PHP framework to use as much as I'm trying
Possible Duplicate: How to catch exceptions I have not really had to use try
I have searched around a bit, and have not really found a professional type
In the past, I have not really used namespaces, but in this project I
I have searched through many times but have not seen this before. Probably really
Input textfield in AIR for iOS looks really ugly when it does not have
Today I think i might have learned something (not sure), i'm not really a
I'm not really sure how to title this question but basically I have an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.