Fix JSON read/write, XML write

This commit is contained in:
Matt Nadareski
2020-08-24 11:56:49 -07:00
parent a424f53407
commit d8fdce88c0
26 changed files with 348 additions and 2064 deletions

View File

@@ -39,7 +39,7 @@ namespace SabreTools.Library.IO
/// <param name="value">Value to write in the attribute</param>
public static void WriteOptionalAttributeString(this XmlTextWriter writer, string localName, string value)
{
if (string.IsNullOrEmpty(value))
if (!string.IsNullOrEmpty(value))
writer.WriteAttributeString(localName, value);
}
@@ -51,7 +51,7 @@ namespace SabreTools.Library.IO
/// <param name="value">Value to write in the element</param>
public static void WriteOptionalElementString(this XmlTextWriter writer, string localName, string value)
{
if (string.IsNullOrEmpty(value))
if (!string.IsNullOrEmpty(value))
writer.WriteElementString(localName, value);
}
}