ASP Classic reading XML Feed

I am having trouble reading the following feed.

my code is as follows:


TheFeed = ""

Set xmlDOM = Server.CreateObject("MSXML2.DOMDocument")
xmlDOM.async = False
xmlDOM.setProperty "ServerHTTPRequest", True

Set itemList = XMLDom.SelectNodes("rss[1]/channel/item") 

myCount = 0
response.write "Getting Cape Town News Feed."
For Each itemAttrib In itemList
    myCount = myCount + 1
    response.write (myCount)
    newsSubject =itemAttrib.SelectSingleNode("title").text
    newsExtract =itemAttrib.SelectSingleNode("description").text
    newsDate =itemAttrib.SelectSingleNode("pubDate").text

Set xmlDOM = Nothing
Set itemList = Nothing


Anyone have any idea why it is not able to parse the feed, and is not giving any form of error.


Try and change




because TheFeed is a variable, not a string :-)

There's an asp script to read RSS feeds here. The comments are in Danish but that shouldn't be a problem if you understand VBS.

However IMO the best way to parse XML with Classic ASP is to use an XSL Stylesheet. Your ASP code would look like this.

set xml = Server.CreateObject("Msxml2.DomDocument.6.0")
  xml.setProperty "ServerHTTPRequest", true
  xml.async = false
  xml.validateOnParse = false
  set xsl = Server.CreateObject("Msxml2.DomDocument.6.0")
  set xsl = nothing
  set xml = nothing

You should be able to find a ready made rss reader xsl document online somewhere

Need Your Help

How to put 2 lists into 1 Dictionary in Python?


So this is the situation: I have 2 lists and want to put them in a dictionary.

Entity Framework Add Performance Degrades With More Rows

c# performance linq entity-framework

I'll begin this post by noting that I'm entirely new to the .NET world. ASP, EntityFramework, Linq, etc. are all mostly unknown magic at this point.