Microsoft.Protocols.TestSuites.MS_CPSWS.MS_CPSWSAdapter.ResponseExists C# (CSharp) Method

ResponseExists() private method

This method is used to validate whether there is an element named as responseName in xmlElement.
private ResponseExists ( XmlElement xmlElement, string responseName ) : bool
xmlElement XmlElement A XmlElement object which is the raw XML response from server.
responseName string The name of the response element.
return bool
        private bool ResponseExists(XmlElement xmlElement, string responseName)
        {
            // The first child is the response element.
            XmlNode firstChildNode = xmlElement.ChildNodes[1].FirstChild;
            return firstChildNode.Name == responseName;
        }