Exemple #1
0
        /// <summary>
        /// Retrieves a <see cref="RssFeed">RssFeed</see> object using
        /// the url provided as the source of the Feed.
        /// </summary>
        /// <param name="Url">The url to retrieve the RSS feed from, this can
        /// be in the format of http:// and also file://.. (ftp?)</param>
        /// <returns>A <see cref="RssFeed">RssFeed</see> object from the
        /// RSS feed's details.</returns>
        public static RssFeed GetFeed(string Url)
        {
            RssReader rssReader = new RssReader();

            return(rssReader.Retrieve(Url));
        }
		/// <summary>
		/// Retrieves a <see cref="RssFeed">RssFeed</see> object using
		/// the url provided as the source of the Feed.
		/// </summary>
		/// <param name="Url">The url to retrieve the RSS feed from, this can
		/// be in the format of http:// and also file://.. (ftp?)</param>
		/// <param name="RdfFormat">If this is set to true, then the XML document
		/// is parsed slightly different, to cater sites with RDF feeds (such as
		/// slashdot.org and register.com). The whole RDF format is not supported,
		/// but those items in RSS which have a corresponding RDF property, such
		/// as description,title for the channel, and title,description for each
		/// item, are matched.</param>
		/// <returns>A <see cref="RssFeed">RssFeed</see> object from the
		/// RSS feed's details.</returns>
		public static RssFeed GetFeed(string Url,bool RdfFormat)
		{
			RssReader rssReader = new RssReader();
			rssReader.RdfMode = RdfFormat;
			return rssReader.Retrieve(Url);
		}
		/// <summary>
		/// Retrieves a <see cref="RssFeed">RssFeed</see> object using
		/// the url provided as the source of the Feed.
		/// </summary>
		/// <param name="Url">The url to retrieve the RSS feed from, this can
		/// be in the format of http:// and also file://.. (ftp?)</param>
		/// <returns>A <see cref="RssFeed">RssFeed</see> object from the
		/// RSS feed's details.</returns>
		public static RssFeed GetFeed(string Url)
		{
			RssReader rssReader = new RssReader();
			return rssReader.Retrieve(Url);
		}
        private RssFeed readRss(string URL)
        {
            RssReader rssReader = new RssReader();
            rssReader.RdfMode = false;
            rssReader.FeedLoaded += new EventHandler(rssReader_FeedLoaded);
            rssReader.ItemAdded += new EventHandler(rssReader_ItemAdded);
            RssFeed feed = rssReader.Retrieve(URL);

            return feed;
        }