BlogEngine.Core.Web.HttpHandlers.Foaf.GetWriter C# (CSharp) Méthode

GetWriter() private static méthode

Creates the necessary startup information for the FOAF document
private static GetWriter ( Stream stream ) : XmlWriter
stream Stream /// The stream. ///
Résultat System.Xml.XmlWriter
        private static XmlWriter GetWriter(Stream stream)
        {
            var settings = new XmlWriterSettings { Encoding = Encoding.UTF8, Indent = true };
            var xmlWriter = XmlWriter.Create(stream, settings);

            xmlWriter.WriteStartDocument();
            xmlWriter.WriteStartElement("rdf", "RDF", "http://www.w3.org/1999/02/22-rdf-syntax-ns#");

            foreach (var prefix in SupportedNamespaces.Keys)
            {
                xmlWriter.WriteAttributeString("xmlns", prefix, null, SupportedNamespaces[prefix]);
            }

            return xmlWriter;
        }