BloomTemp.TempFileUtils.CreateHtml5StringFromXml C# (CSharp) Method

CreateHtml5StringFromXml() public static method

Create a string that could be the contents of an HTML5 file and which corresponds to the specified DOM (presumed to contain appropriate content). This method has no business in this class except that it is so parallel to CreateHtml5FromXml that I wanted to keep them together.
public static CreateHtml5StringFromXml ( XmlNode dom ) : string
dom System.Xml.XmlNode
return string
        public static string CreateHtml5StringFromXml(XmlNode dom)
        {
            var output = new StringBuilder();
            using (var writer = XmlWriter.Create(output, GetXmlWriterSettingsForHtml5()))
            {
                dom.WriteContentTo(writer);
                writer.Close();
            }
            return CleanupHtml5(output.ToString());
        }