The easiest way to add custom elements to a syndicated (ATOM/RSS feed) is to use an XElement, like this:
SyndicationFeed feed = new SyndicationFeed("FeedName", "Feed description");
//fill feed with items (omitted)
XNamespace ns = "http://tempuri.org/myapp";
feed.ElementExtensions.Add(new XElement(ns + "myCustomProperty", "hello"));
return new Atom10FeedFormatter(feed) // to return as an atom feed
Happy feeding!
Showing posts with label XML. Show all posts
Showing posts with label XML. Show all posts
Thursday, August 28, 2008
Subscribe to:
Comments (Atom)