How to Read RSS With VBScript

VBScript is used in older Web or desktop applications, but you can use it to read newer technology such as RSS feeds. RSS feeds provide you with the ability to syndicate content on a blog. RSS readers parse the data and display the content and links to the content in the user's browser or on a custom desktop app.

Instructions

    • 1

      Open your VBScript editor and open the file you want to use to import the RSS feed and parse the data.

    • 2

      Add the connection to the XML file. The following code connects to the XML file named "feed.xml":

      Set xmlDoc = CreateObject(“Msxml2.DOMDocument”)
      xmlDoc.load(“http://site.com/feed.xml”)

    • 3

      Get the list of articles from the feed. The following code gets the list of articles and the associated XML nodes you use to get the content, title and links:

      Set nodelist = xmlDoc.getElementsByTagName(“articles”)

    • 4

      Loop through each element and display the content from the RSS reader. The following code displays each article to the user:

      For Each node in nodelist
      content = node.item(0).Text
      Response.Write(content)
      End For

Related Searches:

References

Comments

Related Ads

Featured