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!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment