From ee166796a509b099c574e37d9b91ff7833c51bb9 Mon Sep 17 00:00:00 2001 From: dbuechel Date: Fri, 21 Dec 2018 11:52:04 +0100 Subject: [PATCH] SEBWIN-221: Fixed parsing of empty XML value tags (bool & string). --- SafeExamBrowser.Configuration/DataFormats/XmlParser.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/SafeExamBrowser.Configuration/DataFormats/XmlParser.cs b/SafeExamBrowser.Configuration/DataFormats/XmlParser.cs index 63476b91..da3039c9 100644 --- a/SafeExamBrowser.Configuration/DataFormats/XmlParser.cs +++ b/SafeExamBrowser.Configuration/DataFormats/XmlParser.cs @@ -222,11 +222,6 @@ namespace SafeExamBrowser.Configuration.DataFormats value = null; - if (element.IsEmpty) - { - return status; - } - switch (element.Name.LocalName) { case XmlElement.Data: @@ -245,7 +240,7 @@ namespace SafeExamBrowser.Configuration.DataFormats value = Convert.ToDouble(element.Value); break; case XmlElement.String: - value = element.Value; + value = element.IsEmpty ? null : element.Value; break; case XmlElement.True: value = true;