/// <summary> /// Retrieves the value of the attribute having the given name, or <c>null</c> if there is no such attribute. /// </summary> /// <param name="element"></param> /// <param name="name"></param> /// <returns></returns> public static string AttributeValue(this IXPathNavigable element, XName name) { return(element.AttributeValueOpt(name).SingleOrDefault()); }