tags:

views:

133

answers:

2

I am trying to get the html for this link http://slashdot.org/firehose.pl?op=rss&content_type=rss&orderby=createtime&fhfilter="home:vamsivanka"

 Dim myRequest As WebRequest
    Dim myResponse As WebResponse
    Try
        myRequest = System.Net.WebRequest.Create(url)
        myRequest.Timeout = 10000
        myResponse = myRequest.GetResponse()
        Dim rssStream As Stream = myResponse.GetResponseStream()
        Dim rssDoc As New XmlDocument()
        rssDoc.Load(rssStream)
    Catch ex As Exception

    End Try

But the rssDoc.Load is giving me an error '--' is an unexpected token. The expected token is '>'. Line 81, position 5.

Please Let me know your suggestions.

A: 

That is a bit odd. There is a free toolkit for consuming RSS feeds that might make this easier: http://aspnetrsstoolkit.codeplex.com/

Some examples of how to use it:

Joel
+1  A: 

Actually, it appears the issue that you're getting is because you have to be logged in to slashdot in order to get that RSS feed. To see what I mean, log out of slashdot and then reload the link you provided above - it takes you to an HTML page instead of the RSS feed. You're getting that error because the HTML page isn't valid XML and therefore can't be loaded by XMLDocument.

It seems that you may have to find a way to get your application to authenticate with slashdot before retrieving the feed. I haven't done that before, so I don't have any advice to give for that. :( I'll update this if I find anything.

Joel
Thank Joel for the input.
vamsivanka