I generate an RSS feed very simply using LINQ to XML. It's the nicest XML API I know of, to be honest.
I have a a couple of extension methods which I use to make it even easier - it converts from an anonymous type to either elements or attributes:
public static IEnumerable<XElement> AsXElements(this object source)
{
foreach (PropertyInfo prop in source.GetType().GetProperties())
{
object value = prop.GetValue(source, null);
yield return new XElement(prop.Name.Replace("_", "-"), value);
}
}
public static IEnumerable<XAttribute> AsXAttributes(this object source)
{
foreach (PropertyInfo prop in source.GetType().GetProperties())
{
object value = prop.GetValue(source, null);
yield return new XAttribute(prop.Name.Replace("_", "-"), value ?? "");
}
}
That may not be at all appropriate for you, but I find it really handy. Of course, this assumes you're using .NET 3.5...