Home > Articles > Data > SQL Server

Generating Atom Feed from SQL Data

  • Print
  • + Share This
Microsoft SQL Server 2005 has extensive support for XML document generation. In this article, Ivan Pepelnjak describes how you can use it to produce an Atom feed directly on the SQL Server with the Transact SQL commands.
Like this article? We recommend

Atom technology (not the one discussed by nuclear physicists) was created in 2003 to address the shortcomings of the then-prevalent RDF Site Summary (RSS; also known as Really Simple Syndication) family of incompatible formats. It gained widespread adoption when Google decided to use it as the Application Program Interface (API) to a variety of its services including Blogger, Gmail, Google News, Google Blog Search, and Google Maps. The Atom format is becoming a generic protocol facilitating data exchange between web services and applications. For example, the Google Maps support the display of locations encoded within an Atom feed with the GeoRSS elements.

In this article, you'll see how you can create an Atom feed from data in your SQL database. We'll use a simple product description table containing product identifiers, names, and descriptions:

 PartNo   nvarchar(20) NOT NULL,
 ProductName nvarchar(200) NOT NULL,
 ProductDescription nvarchar(max) NOT NULL,

You could place this feed directly onto your web site to allow your visitors to subscribe to new product information.

  • + Share This
  • 🔖 Save To Your Account