mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
Net Standard xml writing more consistent with crestron behaviour
This commit is contained in:
parent
a499a97cf6
commit
b73b2de5ee
1 changed files with 10 additions and 3 deletions
|
|
@ -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,10 +128,17 @@ 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
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue