From 7181483fbe0ee2b794ba87584e3cfaeb0d4f23d2 Mon Sep 17 00:00:00 2001 From: "harald.martini@student.tugraz.at" <harald.martini@student.tugraz.at> Date: Fri, 2 Jul 2021 09:55:10 +0200 Subject: [PATCH] Remove null elements in exempted VehicleWriter --- .../Util/XML/Implementation/ComponentWriter/XMLVehicleWriter.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/VECTO3GUI2020/Util/XML/Implementation/ComponentWriter/XMLVehicleWriter.cs b/VECTO3GUI2020/Util/XML/Implementation/ComponentWriter/XMLVehicleWriter.cs index 113550bef7..1953b3a08b 100644 --- a/VECTO3GUI2020/Util/XML/Implementation/ComponentWriter/XMLVehicleWriter.cs +++ b/VECTO3GUI2020/Util/XML/Implementation/ComponentWriter/XMLVehicleWriter.cs @@ -336,6 +336,8 @@ namespace VECTO3GUI2020.Util.XML.Implementation _Xelement.Add(new XElement(_defaultNamespace + XMLNames.Bus_LowEntry, _inputData.LowEntry)); _Xelement.Add(new XElement(_defaultNamespace + XMLNames.Bus_HeighIntegratedBody, _inputData.Height?.ConvertToMilliMeter())); + + _Xelement.DescendantsAndSelf().Where(e => e.Value.IsNullOrEmpty()).Remove(); } #endregion -- GitLab