RssFeed Documented Class Library

RssFeed.DataSource Property

Sets the DataSource (the RSS feed) for the control.

public virtual object DataSource {get; set;}

Property Value

The RssFeed's DataSource - used for databinding. Can be assigned a file path, URL, XmlReader, TextReader, XPathDocument, or RssDocument instance.

Example

[C#]

// The DataSource can be a URL
RssFeed1.DataSource = "http://www.ScottOnWriting.NET/sowBlog/rss.aspx";

// The DataSource can be an XPathDocument
XPathDocument doc = new XPathDocument("http://ScottOnWriting.NET/sowBlog/rss.aspx");
RssFeed1.DataSource = doc;

// You can load an XML string into the control too!
StringReader sr = new StringReader("...XML string...");
RssFeed1.DataSource = sr;

// You can also use an RssDocument
RssEngine engine = new RssEngine();
RssDocument doc = engine.GetDataSource("http://ScottOnWriting.NET/sowBlog/rss.aspx");
RssFeed1.DataSource = doc;

See Also

RssFeed Class | skmRss Namespace