Retrieve() public method

Retrieves an RSS feed using the given Url, parses it and creates and new RssFeed object with the information. If an error occurs in the XML loading of the document, or parsing of the RSS feed, the error is trapped and stored inside the RssFeed's ErrorMessage property.
public Retrieve ( string Url ) : RSSFeed
Url string The url to retrieve the RSS feed from, this can /// be in the format of http:// and also file://.. (ftp?)
return RSSFeed
Beispiel #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>
        /// <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));
        }
Beispiel #2
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);
 }
Beispiel #3
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>
 /// <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);
 }
Beispiel #4
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));
        }