diff --git a/CHANGELOG.md b/CHANGELOG.md index f707ed6..51de3ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed + - Fixed bug preventing deserialization of XML lists ## [9.1.0] - 2019-02-07 ### Added diff --git a/ICD.Common.Utils/Xml/IcdXmlConvert.cs b/ICD.Common.Utils/Xml/IcdXmlConvert.cs index 717ed97..c0a1f4a 100644 --- a/ICD.Common.Utils/Xml/IcdXmlConvert.cs +++ b/ICD.Common.Utils/Xml/IcdXmlConvert.cs @@ -72,7 +72,12 @@ namespace ICD.Common.Utils.Xml throw new ArgumentNullException("type"); using (IcdXmlReader reader = new IcdXmlReader(xml)) - return DeserializeObject(type, reader); + { + if (reader.ReadToNextElement()) + return DeserializeObject(type, reader); + + throw new FormatException("Expected element in XML"); + } } ///