Wednesday, June 25, 2008

Generating RSS/ATOM feeds with TSQL

SQL Server And XML - Generating RSS/ATOM feeds with TSQL


XML Workshop XVIII - Generating an RSS 2.0 Feed with TSQL - If you are already on SQL Server 2005, you could benefit from this this approach. This article shows the code that generates an RSS 2.0 feed using FOR XML with PATH. PATH is introduced with SQL Server 2005 and hence if you are working with SQL Server 2000, you cannot use this approach.
XML Workshop XIX - Generating an ATOM 1.0 Feed with TSQL - This article shows the code that generates an ATOM 1.0 feed using TSQL keyword FOR XML with PATH. Again, this is specific to SQL Server 2005/2008. If you are working with SQL Server 2000, then you cannot use the approach explained in this article.
XML Workshop XX - Generating an RSS 2.0 Feed with TSQL(SQL server 2000) - Well, this is for SQL Server 2000. This article shows the code needed to generate an RSS 2.0 feed using FOR XML with EXPLICIT. EXPLICIT is available in SQL Server 2000/2005/2008 and hence this approach will suite you, if you are working with SQL Server 2000. The code using EXPLICIT might look really complex. So, this code may be ideal only if you are working with SQL Server 2000. If you are on 2005/2008, the approach using PATH will be recommended.
XML Workshop XX - Generating an ATOM 1.0 feed with TSQL using FOR XML EXPLICIT - This is the ATOM 1.0 version of the above code. This article is not published yet. I will update the link once the article is published.
XML Workshop XV - Accessing FOR XML results with ADO.NET - You might need this if you are generating your RSS/ATOM feeds in TSQL. This explains how to pass the XML results to your .NET application. This article has VB.NET and C#.NET sample code (ADO.NET) that explain how call a stored procedure that returns an XML stream and access the XML document returned by the stored procedure

No comments: