Generate custom RSS/Atom feed with SyndicationFeedFormatter made from XML

Posted by Sentax on Stack Overflow See other posts from Stack Overflow or by Sentax
Published on 2010-03-04T23:36:39Z Indexed on 2010/03/07 23:26 UTC
Read the original article Hit count: 272

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about rss

Related posts about .NET