how i can get feed url (RSS Or ATOM) from blog url ex:- http://anirudhagupta.blogspot.com/ So how i can get his feed dynamically by c#
i say that how i can get blog's feedurl by using Regex and c#
how i can get feed url (RSS Or ATOM) from blog url ex:- http://anirudhagupta.blogspot.com/ So how i can get his feed dynamically by c#
i say that how i can get blog's feedurl by using Regex and c#
The Rss feeds can vary with what you specifically want to look at, but for blogspot it's usually
blogname/feeds/posts/default ie. http://anirudhagupta.blogspot.com/feeds/posts/default
If you're using VS 2008, you can use the SyndicationFeed object to read both RSS and ATOM feeds. (I assume this is what you want to do when you say "get his feed dynamically")
XmlReader reader = XmlReader.Create(feedUriString);
SyndicationFeed feed = SyndicationFeed.Load(reader);
foreach (SyndicationItem item in feed.Items)
{
//your code for rendering each item
}
http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.aspx http://jimleonardo.blogspot.com/2009/02/jimleocom-is-back-up-some-how-to.html
When you visit the root page of the site, ie. http://myblog.com/ you should find a link attribute in the head, something like:
<link rel="alternate" type="application/rss+xml" title="MyBlog RSS Feed" href="http://feeds.feedburner.com/MyBlog" />
Now, no site is guaranteed to have that link in the head, but if they want that little rss logo to show up in firefox or internet explorer when users visit their site, they probably have added that line. Wordpress does it by default.
Note: My examples are just fictitious examples, not real sites. But just look at the source of a few blogs you know, and you should see a link tag like this.