diff --git a/ICD.Common.Utils/Xml/XmlUtils.cs b/ICD.Common.Utils/Xml/XmlUtils.cs index 1d5b287..1dd300a 100644 --- a/ICD.Common.Utils/Xml/XmlUtils.cs +++ b/ICD.Common.Utils/Xml/XmlUtils.cs @@ -472,6 +472,25 @@ namespace ICD.Common.Utils.Xml } } + /// + /// Gets the content of the immediate child. Returns null if the child element was not found. + /// + /// + /// + /// + [PublicAPI] + public static uint? TryReadChildElementContentAsUInt(string xml, string childElement) + { + try + { + return ReadChildElementContentAsUint(xml, childElement); + } + catch (FormatException) + { + return null; + } + } + /// /// Gets the content of the immediate child. Returns null if the child element was not found. ///