tags:

views:

194

answers:

5

Hi I'm trying to working with RSS feeds in C#. I added RSS feeds like

this and this

When I try to read into a DataSet like:

 ds.readxml(rsspath)

I get some tables in a DataSet. Now how do I know which table contains exact data of all the products?

I'm not getting products list if I write:

gv.datasource = ds.tables[0]

Any help or suggestions?

+1  A: 

XmlDocument+ XPath or Linq2Xml should be a better way of handling the data

Fredrik Leijon
A: 

You could also try RSS.NET.

Jim
A: 

Maybe you should check out the System.ServiceModel.Syndication namespace instead?

Svish
A: 

This is example code puts your RSS Feed into a collection of Syndication Items:

Using statements:

using System.ServiceModel.Syndication;
using System.Xml;

Actual code:

string url = "http://www.amazon.com/rss/tag/blu-ray/new/ref=tag_rsh_hl_ersn_brp?%5Fencoding=UTF8&length=10";
XmlReader xmlReader = XmlReader.Create(url);
IEnumerable<SyndicationItem> items;
items = SyndicationFeed.Load(xmlReader).Items;
James Lawruk
A: 

Yes try Linq2Xml. Here is an article that elaborates on both creating and consuming despite the title.

dove