/// <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)); }
private bool UpdateItemCollection() { bool ret = false; foreach (string u in mUrlList) { RSSFeed f = RSSReader.GetFeed(u); if (string.IsNullOrEmpty(f.ErrorMessage)) { mItemCollection.RemoveAll(delegate(RSSItem o) { return(o.Feed.URL == u); }); foreach (RSSItem i in f.Items) { mItemCollection.Add(i); ret = true; } } } return(ret); }
/// <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)); }