Another way to build a RSS system in SharePoint that I would like to share My approach was to use a custom User Control in a ASPX Page


Add this to your control

<%@ OutputCache Duration="120" VaryByParam="*" %>
Code Behind

Build your query, you must change “YourDateField”  

protected SPQuery BuidQryForYourPages()
     SPQuery qry = new SPQuery();
     qry.ViewAttributes += “Scope=\”Recursive\”";
string camlQry = String.Empty;
     qry.Query = camlQry;
         camlQry =
             <FieldRef Name=’YourDateField’
                Ascending=’False’ /></OrderBy>”;
         qry.Query = camlQry;
     catch (Exception)
     qry.RowLimit = 10;
     return qry;

Code for RSS 2.0 Standards

You must change “/YourUrlHost” e.g. http://contoso/YourUrlHost and all of “elem[]” matching your fields in the List

protected void GetYourRss()
    readonly string urlHost = String.Format(“{0}//{1}:{2}”,
        string URL = urlHost + “/YourUrlHost”;
        Response.ContentType = “text/xml”;
        XmlTextWriter TextWriter = new XmlTextWriter
            (Response.OutputStream, Encoding.UTF8);
//Below tags are mandatory rss tag
        TextWriter.WriteAttributeString(“version”, “2.0″);
// Channel tag will contain RSS feed details
            (“title”, “JOAO TITO LIVIO”);
            (“link”, “http://”);
            (“description”, “Enjoy your RSS”);
            (“copyright”, “Copyright 2011 Joao Tito Livio. All rights reserved.”);
using (SPSite site = new SPSite(URL))
            using (SPWeb web = site.OpenWeb())
                SPList pagesList = web.Lists["Pages"];
                SPListItemCollection lstPaginasl =
                for (int z = 0; z < lstPaginasl.Count; z++)
                    SPItem elem = lstPaginasl[z];
                    if (elem["YourTitleItem"] != null)
                    if (elem["YourDescriptionItem"] != null)
                    if (elem["YourLinkItem"] != null)
                            String.Format(“{0}/Pages/{1}”, URL,
                    if (elem["YourPubDate"] != null)
// Close all tags
    catch (Exception ex)
        throw new Exception(ex.ToString());

Page Load

Call your Method
Hope that help you