FlickrNet.UnknownResponse.GetAttributeValue C# (CSharp) Method

GetAttributeValue() public method

Gets an attribute value from the given response.
public GetAttributeValue ( string element, string attribute ) : string
element string The element name to find.
attribute string The attribute of the element to return.
return string
        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;
        }