views:

128

answers:

1

Can you add an XML-stylesheet to the RSS feed generated through the new System.ServiceModel.Syndication namespace?

A: 

Try adding this at the top of the page :

<?xml-stylesheet type="text/xsl" href="urlToXSLstyleSheet" version="1.0"?>
Andreas Grech
After creating the feed as a SyndicationFeed object, it is passed as an argument to the Rss20FeedFormatter and the formatter writes it to the Output stream of the Response obeject.My issue here is that i don't seem to be able to find a way to add an xml-stylesheet to the generated xml. Come to think about, is it even posible :)?
But can't you write the above tag I mentioned in the Response, before echoing the formatter ?
Andreas Grech