public static bool IsAttributeSet(this XmlElement xmlElement, ISessionObject session, string attributeName) { var strValue = xmlElement.GetAttributeValue(attributeName); return !string.IsNullOrEmpty(strValue) && strValue != session.Session.SessionKey; }