Quantcast
Viewing latest article 7
Browse Latest Browse All 7

Consuming WordPress RSS Feed In ASP.NET

How do I consume my WordPress blog's RSS feed to display my latest blog posts on my homepage? I ran into the following piece of code to do this:

  Function GetRSSFeed(strURL as String) as DataTable'Get the XML data    Dim reader as XmlTextReader = New XmlTextReader(strURL)'return a new DataSet    Dim ds as DataSet = New DataSet()    ds.ReadXml(reader)        Return ds.Tables(2)  End Function

But it errors out at this line: 'ds.ReadXml(reader)' with the following error:

A column named 'comments' already belongs to this DataTable.

Perhaps it doesn't work since this code is from 2003? Does anyone have a working code sample? Many thanks in advance!


Viewing latest article 7
Browse Latest Browse All 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>