public string GetAttributeValue(string element, string attribute) { System.Xml.Linq.XDocument doc = GetXDocument(); if (String.IsNullOrEmpty(element) || element == "*") return doc.Descendants().Attributes(attribute).First().Value; else return doc.Descendants(element).Attributes(attribute).First().Value; }