diff --git a/ICD.Common.Utils/Xml/IcdXmlTextWriter.cs b/ICD.Common.Utils/Xml/IcdXmlTextWriter.cs index a5dd31f..b5eaa37 100644 --- a/ICD.Common.Utils/Xml/IcdXmlTextWriter.cs +++ b/ICD.Common.Utils/Xml/IcdXmlTextWriter.cs @@ -43,7 +43,7 @@ namespace ICD.Common.Utils.Xml #if SIMPLSHARP : this(new XmlTextWriter(textWriter.WrappedTextWriter)) #else - : this(XmlWriter.Create(textWriter.WrappedTextWriter)) + : this(XmlWriter.Create(textWriter.WrappedTextWriter, GetSettings())) #endif { } @@ -128,15 +128,22 @@ namespace ICD.Common.Utils.Xml #if STANDARD private static XmlWriterSettings GetSettings(Encoding encoding) + { + XmlWriterSettings output = GetSettings(); + output.Encoding = encoding; + return output; + } + + private static XmlWriterSettings GetSettings() { return new XmlWriterSettings { - Encoding = encoding, + ConformanceLevel = ConformanceLevel.Fragment, Indent = true }; } #endif -#endregion + #endregion } }