private bool ElementExists(XmlElement xmlElement, string elementName) { string content = xmlElement.OuterXml; if (content.Contains(elementName)) { return true; } return false; } }