public static int? GetIntAttributeValue(this XmlElement xmlElement, string attributeName) { XmlAttribute attr = xmlElement.Attributes[attributeName]; return attr == null ? (int?) null : int.Parse(attr.Value); }