Beispiel #1
0
        /// <summary>
        /// Finds a child element starting from parent and returns the inner text value.
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="childElement"></param>
        /// <returns></returns>
        public static string ElementValue(
            this XElement parent, string childElement)
        {
            var child = parent.ElementByLocalName(childElement);

            return(child?.Value);
        }