merge multiple rss feeds - c#

I think it's very basic question but i want to know how to merge multiple rss feeds and display the merged feed
As feeds are from multiple sources, i have to remove duplicate feeds and display only relevant information.
I am using asp.net(VS2010).
Some of other posts:
Merging Multiple RSS feeds
merge rss feeds
I don't want to use yahoo pipes.
Please let me know how can i do this..

Feeds are in xml format. So you have to merge the contents of the "channel" nodes of your rss feeds. For this look at this link How to merge two XmlDocuments in C#
Please also see this: Multiple channels in a single RSS xml - is it ever appropriate?

Related

How do I retrieve RSS Feeds based on a date range?

How do I retrieve RSS Feeds based on a date range?
Specifically, how do I prepare the url so that I can get items that were published past a certain date?
www.pwop.com/feed.aspx?show=dotnetrocks&filetype=master&tags=Craftsmanship
Your questions is more related to the HTTP API of the site, not RSS it self.
RSS is a predefined XML data format.
Most RSS urls doesn't support filters and introduce simple URL which returns in RSS format the last X results (x is usually between 10 to 50 results).
Some URL allow to specify categories or Tags like in your example, so the reutrn RSS XML will contain only results from this tags.
If you don't want to miss results, you need to keep query the RSS URL every X minutes/hours depends on the update speeds of the results.
Other option is to contact the site and request a full API access or even to implement a feature to filter by date.
Not all websites support it, but maybe there is a solution that can work:
Websites usually have a sitemap.xml (or sitemap.xml.gz or sitemap.gz) file that contains all the urls in bulk or grouped in some way (e.g., by category, tag, month). The sitemap.xml can contain links to additional xmls and so on.
The main sitemap is typically located in the root of the site (e.g., https://news.bitcoin.com/sitemap.xml), but you can find more information about sitemaps here: https://www.sitemaps.org/protocol.html.
If a website has such an xml file, perhaps processing it will make it easier to extract the needed information without any special site crawler or API.

RSS Feed in asp.net

I have to develop RSS Feed in asp.net. Events will be logged as text along with the more set of fields. This table will be published as an RSS feed to be loaded in Outlook. I have no idea how to develop this though I have few queries:
My understanding after reading on RSS Feed is that it has to be in specific format. Is it?
I have to generate different types of messages. Do I need to create different-different RSS feed?
How RSS feed will be loaded in Outlook? I know user need to configure it in outlook though How will it load new event in outlook automatically?
Thanks
You can generate rss feeds using SyndicationFeed class in dotnet. It is available in the system.Servicemodel.Syndication namespace. Look up on msdn for syndication feed and you find a sample for generating both rss 2.0 and atom 1.0 feeds.
To answer your questions:
1. Yes feeds need to be in rss or atom formats. Dotnet supports feed generation in both atom and rss. You essentially pick the formatter you want and serialize the object that contains the data for the feed.
2. Typically there is one feed which contains several feed items. Example: google news has an rss feed. This is a single feed and each news item is a feed item.
3. Outlook 2007 has an entry for rss feeds in inbox. Right-click gives you an option to add a new feed where you will enter the url for the feed.
Since you are new to rss i suggest you load certain rss feeds in a browser. In the browser view tge source of the page and you will see the xml containing the feed.
Hope this helps.

The way I should parse RSS feed like other applications?

I am thinking now how the rss applications are parsing the feeds, basically if I just want to parse XML from the feed I will use XMLReader
http://content.warframe.com/dynamic/rss.php
Based on this feed I will get exception about illegal path (this is less important), BUT I can put this link to another application (link at the bottom) and it will work...
There is w3c validator which shows many error
http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fcontent.warframe.com%2Fdynamic%2Frss.php
If this rss feed really have so many "errors", why it is working with other applications? On example when i put it into:
http://feed.mikle.com/

Read xml from joining several files

Hello i'm facing problem trying to parse a XPS printed file. I have a interleaving printed XPS file, and i want to parse this XML files, but the output is coming in pieces. i.e i have a [0].piece [1].piece [2].piece and [3].last.piece files and all them together represent the xml that i need to parse. do you guys have any idea what can i do to join all this files and transform them to a valid XML in order to be read it using .Net C#.
Thanks in advance
Use XDoc to read each file, then Linq To XML to select all of the elements you want.
XDocument reference
EDIT: For the stream idea I put in my reply to your comment, this came up:
Stitching together multiple streams in one Stream class

Finding RSS Feeds and displaying RSS Feeds on website using asp.net, c#

I have seen many of website are displaying RSS Feeds on their website.
Example:
1) compgroups.net
2) velocityreviews.com
3) bytes.com
4) eggheadcafe.com
And many other websites.
What i observe is Google is even giving them good rank despite of duplicate content.
What i want to know is...
How can I find RSS Feeds? Also where can i found RSS Feeds for Yahoogroups?
Read here: http://help.yahoo.com/l/ca/yahoo/groups/rss/rss-03.html
The source of an RSS feed is XML. You can request a feed from c# using the HttpRequest, providing the url of the feed.
You read in the XML, process it and show its contents in your webpage.

Categories