Firstly, download and add a reference to the Tr3v.RSS.dll
using Tr3v.RSS;
Channel channel = new Channel("Tr3v RSS Feed", new Uri("http://tr3v.net/"), "Tr3v.net Blog Feed");
channel.Items.Add(new Item("Tr3v RSS Feed 1", new Uri("http://tr3v.net"), "Tr3v.RSS Example 1"));
channel.SaveAs(new System.IO.FileInfo(@"c:\test.xml"));
Channel channel = new Channel("Tr3v RSS Feed", new Uri("http://tr3v.net/"), "Tr3v.net Blog Feed");
try
{
using (SqlConnection connection = new SqlConnection("your connection string"))
{
using (SqlCommand command = new SqlCommand("your SQL query", connection))
{
command.CommandType = CommandType.Text;
command.Connection.Open();
SqlDataReader dataReader = command.ExecuteReader();
while (dataReader.Read())
{
channel.Items.Add(new Item(dataReader["title"],
new Uri(dataReader["link"]),
dataReader["description"]);
}
}
}
}
The RSS 2.0 specification for displaying email addresses is "user@domain.com (Forename Surname)".
Tr3v.RSS fully supports this providing that when you set the email address, you set the display name.
...
item.Author = new System.Net.Mail.MailAddress("fred.flintstone@bedrock.com", "Fred Flintstone");
...
Will be output as
I used the following sites for reference when building this class library. If you want/need to go into more depth regarding RSS please read them.
http://www.rssboard.org
http://www.w3schools.com/rss/
http://validator.w3.org/feed/ - RSS feed validator, useful for checking your RSS output is valid.

Tr3v.RSS is designed to output valid RSS 2.0 compliant XML, to check your output, please use the validator linked above.
| Date | Version | Notes |
| 07/04/2008 | 1.0.0.0 | Initial Build |