Click here to Skip to main content
15,886,362 members
Articles / Programming Languages / Visual Basic

Weather Forecast with Yahoo! Weather RSS Feed

Rate me:
Please Sign up or sign in to vote.
4.39/5 (20 votes)
13 Jul 2009CPOL2 min read 234.5K   3.4K   49  
A class based on the Yahoo! Weather RSS feed.
Imports Microsoft.VisualBasic
Imports System.Xml.Serialization
Partial Class YahooWeatherForecast
    Partial Class rssClass
        Partial Class channelClass
            Partial Class itemClass
                Private _title As String
                ''' <summary>
                '''  The forecast title and time, for example "Conditions for New York, NY at 1:51 pm EST" 
                ''' </summary>
                <XmlElement()> _
                Public Property title() As String
                    Get
                        Return _title
                    End Get
                    Set(ByVal value As String)
                        _title = value
                    End Set
                End Property


                Private _link As String
                ''' <summary>
                '''  The Yahoo! Weather URL for this forecast. 
                ''' </summary>
                <XmlElement()> _
                Public Property link() As String
                    Get
                        Return _link
                    End Get
                    Set(ByVal value As String)
                        _link = value
                    End Set
                End Property

                Private _description As String
                ''' <summary>
                '''  A simple summary of the current conditions and two-day forecast, in HTML format, including a link to Yahoo! Weather for the full forecast.
                ''' </summary>
                <XmlElement()> _
                Public Property description() As String
                    Get
                        Return _description
                    End Get
                    Set(ByVal value As String)
                        _description = value
                    End Set
                End Property

                Private _guid As String
                ''' <summary>
                '''  Unique identifier for the forecast, made up of the location ID, the date, and the time. The attribute isPermaLink is false. 
                ''' </summary>
                <XmlElement()> _
                Public Property guid() As String
                    Get
                        Return _guid
                    End Get
                    Set(ByVal value As String)
                        _guid = value
                    End Set
                End Property

                Private _pubDate As String
                ''' <summary>
                '''  The date and time this forecast was posted, in the date format defined by RFC822 Section 5, for example Mon, 25 Sep 17:25:18 -0700. 
                ''' </summary>
                <XmlElement()> _
                Public Property pubDate() As String
                    Get
                        Return _pubDate
                    End Get
                    Set(ByVal value As String)
                        _pubDate = value
                    End Set
                End Property

                Private _lat As String
                ''' <summary>
                '''  The latitude of the location.
                ''' </summary>
                <XmlElement()> _
                Public Property lat() As String
                    Get
                        Return _lat
                    End Get
                    Set(ByVal value As String)
                        _lat = value
                    End Set
                End Property


                Private _long As String
                ''' <summary>
                '''  The longitude of the location
                ''' </summary>
                <XmlElement()> _
                Public Property [long]() As String
                    Get
                        Return _long
                    End Get
                    Set(ByVal value As String)
                        _long = value
                    End Set
                End Property

                Private _condition As conditionClass
                ''' <summary>
                '''  The longitude of the location
                ''' </summary>
                <XmlElement()> _
                Public Property condition() As conditionClass
                    Get
                        Return _condition
                    End Get
                    Set(ByVal value As conditionClass)
                        _condition = value
                    End Set
                End Property

                Private _forecast As forecastClass
                ''' <summary>
                '''  The longitude of the location
                ''' </summary>
                <XmlElement()> _
                Public Property forecast() As forecastClass
                    Get
                        Return _forecast
                    End Get
                    Set(ByVal value As forecastClass)
                        _forecast = value
                    End Set
                End Property


            End Class
        End Class
    End Class
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Iran (Islamic Republic of) Iran (Islamic Republic of)
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions