Implementing RSS and XML serialization in .NET

Implementing RSS and XML serialization in .NET

RSS is increasingly emerging as a useful means of exchanging information. And it's not just for the latest news and sports scores -- enterprises are increasingly examining ways to use RSS to improve communication and information sharing among employees.

As RSS spreads, building it into applications grows in importance. Scott Van Vliet recently blogged about this in a post entitled RSS in .NET Made Easy with XML Serialization.

"I use XmlSerializer religiously, and thought it would be quite trivial to build a set of classes to quickly create and publish an RSS feed. Thus, as any geek would do, I did just that," Van Vliet wrote.

"These classes are adorned with System.Xml.Serialization attributes, which comply with the RSS 2.0 Specification," he continued. "To create an RSS document, it's no more difficult than creating and populating [an object]. To generate the XML for this feed, simply call the ToString() method."

Among the comments on Van Vliet's post is a link to a blog post by Phil Weber called East RSS in VB.NET.

"First, I created this class to model the feed….Now all it takes

    Requires Free Membership to View

    When you register, you'll begin receiving targeted emails from my team of award-winning writers. Our goal is to provide a unique online resource for developers, architects and development managers tasked with building and maintaining enterprise applications using Visual Basic, C# and the Microsoft .NET platform.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchWinDevelopment.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchWinDevelopment.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

to update the feed is to populate the RSS object and serialize it to XML," Weber wrote. (Source code is available for the "this class" here.)

These quick tips should be enough to get you started with adding RSS to .NET applications.

More on this topic from SearchVB.com

  • Definition: RSS
  • Reference: RSS Learning Guide
  • Tip: Use real-time RSS feeds

    This was first published in October 2006

  • Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.