mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 04:35:00 +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
|
#if SIMPLSHARP
|
||||||
: this(new XmlTextWriter(textWriter.WrappedTextWriter))
|
: this(new XmlTextWriter(textWriter.WrappedTextWriter))
|
||||||
#else
|
#else
|
||||||
: this(XmlWriter.Create(textWriter.WrappedTextWriter))
|
: this(XmlWriter.Create(textWriter.WrappedTextWriter, GetSettings()))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -128,15 +128,22 @@ namespace ICD.Common.Utils.Xml
|
|||||||
|
|
||||||
#if STANDARD
|
#if STANDARD
|
||||||
private static XmlWriterSettings GetSettings(Encoding encoding)
|
private static XmlWriterSettings GetSettings(Encoding encoding)
|
||||||
|
{
|
||||||
|
XmlWriterSettings output = GetSettings();
|
||||||
|
output.Encoding = encoding;
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static XmlWriterSettings GetSettings()
|
||||||
{
|
{
|
||||||
return new XmlWriterSettings
|
return new XmlWriterSettings
|
||||||
{
|
{
|
||||||
Encoding = encoding,
|
ConformanceLevel = ConformanceLevel.Fragment,
|
||||||
Indent = true
|
Indent = true
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user