private void WriteAtomFeed(Stream stream, List<IPublishable> publishables, string title)
{
var writerSettings = new XmlWriterSettings { Encoding = Encoding.UTF8, Indent = true };
// ------------------------------------------------------------
// Create writer against stream using defined settings
// ------------------------------------------------------------
using (var writer = XmlWriter.Create(stream, writerSettings))
{
writer.WriteStartElement("feed", "http://www.w3.org/2005/Atom");
// writer.WriteAttributeString("version", "1.0");
// ------------------------------------------------------------
// Write XML namespaces used to support syndication extensions
// ------------------------------------------------------------
foreach (var prefix in SupportedNamespaces.Keys)
{
writer.WriteAttributeString("xmlns", prefix, null, SupportedNamespaces[prefix]);
}
// ------------------------------------------------------------
// Write feed content
// ------------------------------------------------------------
this.WriteAtomContent(writer, publishables, title);
writer.WriteFullEndElement();
}
}