From 368bb12b846f7de3cd31693a48e5339da380c46f Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Tue, 5 May 2020 16:26:32 +0200
Subject: [PATCH] fix reading MRF: correct allocation of simulation parameters
 and FC to result entry

---
 VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs
index 02829c84b0..f7b8acad5d 100644
--- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs
@@ -929,8 +929,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 				var entry = new Result {
 					ResultStatus = node.Attributes.GetNamedItem("status").InnerText,
 					Mission = node.SelectSingleNode("./*[local-name()='Mission']").InnerText.ParseEnum<MissionType>(),
-					SimulationParameter = GetSimulationParameter(node.SelectSingleNode("//*[local-name() = 'SimulationParameters' or local-name() = 'SimulationParametersCompletedVehicle']")),
-					EnergyConsumption = node.SelectSingleNode("//*[local-name()='Fuel' and FuelConsumption/@unit='MJ/km']")?
+					SimulationParameter = GetSimulationParameter(node.SelectSingleNode("./*[local-name() = 'SimulationParameters' or local-name() = 'SimulationParametersCompletedVehicle']")),
+					EnergyConsumption = node.SelectSingleNode("./*[local-name()='Fuel' and FuelConsumption/@unit='MJ/km']")?
 											.Cast<XmlNode>().Select(
 												x => new KeyValuePair<FuelType, JoulePerMeter>(
 													x.Attributes.GetNamedItem(XMLNames.Report_Results_Fuel_Type_Attr).InnerText.ParseEnum<FuelType>(),
-- 
GitLab