private static string GetAttributeValue(XElement e, XName name) { XAttribute attribute = e.Attribute(name); return attribute == null ? String.Empty : attribute.Value; }