mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-02 14:25:02 +00:00
Net Standard xml writing more consistent with crestron behaviour
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user