mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix JSON read/write, XML write
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user