Click here to Skip to main content
12,633,440 members (30,025 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » Samples » Downloads

Stats

39.7K views
627 downloads
52 bookmarked
Posted

A very standard, powerful and easy to use Sample and Library for working on RSS 2.0

, 18 Feb 2005 MIT
With this library, you can easily create some RSS 2.0 files for your site and/or use some RSS 2.0 files from other sites into your site.
namespace IranianExperts.RSS
{
	public class RSSChannel
	{
		private string _docs = "";
		private string _link = "";
		private string _title = "";
		private string _pubDate = "";
		private string _generator = "";
		private string _webMaster = "";
		private string _copyright = "";
		private string _description = "";
		private string _lastBuildDate = "";
		private string _managingEditor = "";

		private RSSLanguage _language = RSSLanguage.en_US;

		/// <summary>
		/// [Optional] - A URL that points to the documentation for the format used in the RSS file. It's probably a pointer to this page. It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is.
		/// </summary>
		public string Docs
		{
			get
			{
				return(_docs);
			}
			set
			{
				_docs = value;
			}
		}

		/// <summary>
		/// [Required] - The URL to the HTML website corresponding to the channel.
		/// </summary>
		public string Link
		{
			get
			{
				return(_link);
			}
			set
			{
				_link = value;
			}
		}

		/// <summary>
		/// [Required] - The name of the channel. It's how people refer to your service. If you have an HTML website that contains the same information as your RSS file, the title of your channel should be the same as the title of your website.
		/// </summary>
		public string Title
		{
			get
			{
				return(_title);
			}
			set
			{
				_title = value;
			}
		}

		/// <summary>
		/// [Optional] - The publication date for the content in the channel. All date-times in RSS conform to the Date and Time Specification of RFC 822, with the exception that the year may be expressed with two characters or four characters (four preferred). RFC 822 Formated date.
		/// </summary>
		public string PubDate
		{
			get
			{
				return(_pubDate);
			}
			set
			{
				_pubDate = value;
			}
		}
		/// <summary>
		/// [Optional] - A string indicating the program used to generate the channel.
		/// </summary>
		public string Generator
		{
			get
			{
				return(_generator);
			}
			set
			{
				_generator = value;
			}
		}

		/// <summary>
		/// [Optional] - Email address for person responsible for technical issues relating to channel.
		/// </summary>
		public string WebMaster
		{
			get
			{
				return(_webMaster);
			}
			set
			{
				_webMaster = value;
			}
		}

		/// <summary>
		/// [Optional] - Copyright notice for content in the channel.
		/// </summary>
		public string Copyright
		{
			get
			{
				return(_copyright);
			}
			set
			{
				_copyright = value;
			}
		}

		/// <summary>
		/// [Required] - Phrase or sentence describing the channel.
		/// </summary>
		public string Description
		{
			get
			{
				return(_description);
			}
			set
			{
				_description = value;
			}
		}

		/// <summary>
		/// [Optional] - The last time the content of the channel changed. RFC 822 Formated date.
		/// </summary>
		public string LastBuildDate
		{
			get
			{
				return(_lastBuildDate);
			}
			set
			{
				_lastBuildDate = value;
			}
		}

		/// <summary>
		/// [Optional] - Email address for person responsible for editorial content.
		/// </summary>
		public string ManagingEditor
		{
			get
			{
				return(_managingEditor);
			}
			set
			{
				_managingEditor = value;
			}
		}

		/// <summary>
		/// [Optional] - The language the channel is written in. This allows aggregators to group all Italian language sites, for example, on a single page. A list of allowable values for this element, as provided by Netscape, is here. You may also use values defined by the W3C.
		/// </summary>
		public RSSLanguage Language
		{
			get
			{
				return(_language);
			}
			set
			{
				_language = value;
			}
		}

		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="title"></param>
		/// <param name="link"></param>
		/// <param name="description"></param>
		public RSSChannel(string title, string link, string description)
		{
			_link = link;
			_title = title;
			_description = description;
		}

		#region Support
		public static string Owner
		{
			get
			{
				return("Dariush Tasdighi - From Tehran, Iran");
			}
		}

		public static string Version
		{
			get
			{
				return("1.0.0");
			}
		}

		public static string Support
		{
			get
			{
				return("Dariush@IranianExperts.com;DariushT@GMail.com;DariushTasdighi@Yahoo.com");
			}
		}

		public static string Homepage
		{
			get
			{
				return("http://www.IranianExperts.com;http://groups.yahoo.com/group/IranianExperts");
			}
		}

		public static string UpdatedDate
		{
			get
			{
				return("14 Feb 2005");
			}
		}
		#endregion
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License

Share

About the Author

Dariush Tasdighi
Web Developer Sematec Ins.
Iran (Islamic Republic of) Iran (Islamic Republic of)
My experiences are:

HTML 5.0, CSS 3.0
JQuery, Angular JS, Bootstrap

MVC 5.0, WEB API, c#

My Site URLs:
http://www.IranianExperts.ir
http://www.IranianExperts.com

My Yahoo Group URL: http://groups.yahoo.com/group/iranianexperts

Mobile: 0098-912-108-7461
Address: Tehran, Tehran, Iran

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161208.2 | Last Updated 18 Feb 2005
Article Copyright 2005 by Dariush Tasdighi
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid