Generate custom RSS/Atom feed with SyndicationFeedFormatter made from XML
- by Sentax
I have followed this article and implemented my service and I can open the web browser and see the test data being published. I would like to create a custom formatted response, as for my needs this will not be published to the internet and it's an isolated feed that other devices on the local network could read to get the data I'm publishing.
I'd like to create an XML document and publish it instead of using the SyndicationItem that is being used in the article to display title, author, description, etc.
Would like to create something simple to be published:
<MyData>
<ID>33883</ID>
<Title>The Name</Title>
<Artist>The Artist</Artist>
</MyData>
I know how to create that in an XMLWriter, but how to publish in a SyndicationFeedFormatter that is the return type for the function in the article?
I have seen the XmlSyndicationContent class but haven't seen any practical examples that would accomplish what I want to do.