Link to home
Start Free TrialLog in
Avatar of Robb Hill
Robb HillFlag for United States of America

asked on

Convert RSS Feed URL into an XML File

I have a url of an RSS Feed and would like to get it on my computer in the format of an XML file.  How do you go about doing this?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of jkmyoung
jkmyoung

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jawahar_prasad
jawahar_prasad

just open the file in web browser and click File > Save As in the IE or whatever browser you use...
Avatar of Robb Hill

ASKER

   Private Sub GetWNBC_SportsData(ByVal stateInfo As Object)

        'Variables for working with exisitng RSS feed's XML data
        Dim xmldoc As New Xml.XmlDocument
        Dim xmlnlist As Xml.XmlNodeList
        Dim xmln As Xml.XmlNode
        Dim config As System.Configuration.ConfigurationSettings

        '----------------------------------------------------------------------------------------------------
        'The following variables are used for creating the new xml file
        Dim xmlRevDoc As New Xml.XmlDocument
        ' Create the root element
        Dim rootNode As XmlElement = xmlRevDoc.CreateElement("WNBC_Sports")
        xmlRevDoc.AppendChild(rootNode)
        '----------------------------------------------------------------------------------------------------
        Try

            xmldoc.Load(config.AppSettings("DataSports"))
            xmlnlist = xmldoc.SelectNodes("//item/description")
            Dim category As String = "WNBC_Sports"
            For Each xmln In xmlnlist
                'Get node information used for new xml file
                Dim description As String = xmln.InnerText
                ' Create the required nodes
                Dim mainNode As XmlElement = xmlRevDoc.CreateElement("Description")
                'retrieve the text
                Dim txtDescription As XmlText = xmlRevDoc.CreateTextNode(description)
                'append the nodes to the parent node without the value
                rootNode.AppendChild(mainNode)
                ' save the value of the field into the node
                mainNode.AppendChild(txtDescription)
            Next

            WriteXML(category, xmlRevDoc.OuterXml.ToString)
            'xmlRevDoc.Save("WNBC_Sports_Description.xml")
        Catch ex As Exception
            cErr.ReportError(ex)
        End Try

    End Sub