I am trying to get some data from this WSDL file(xml format) "http://pastebin.com/gF7aHwa3", for example, the value of wsdl:service name, which is CinemaData. Not getting any value with this code:
static void Main(string[] args)
{
XmlDocument doc = new XmlDocument();
doc.Load(@"C:\wsdl\0_Argentina_CinemaData.wsdl");
XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);
//nsmgr.AddNamespace("soap", "http://schemas.xmlsoap.org/wsdl/soap");
//nsmgr.AddNamespace("tm", "http://microsoft.com/wsdl/mime/textMatching");
//nsmgr.AddNamespace("soapenc", "http://schemas.xmlsoap.org/soap/encoding");
//nsmgr.AddNamespace("mime", "http://schemas.xmlsoap.org/wsdl/mime");
//nsmgr.AddNamespace("tns", "http://www.e-wavegroup.com");
//nsmgr.AddNamespace("s", "http://www.w3.org/2001/XMLSchema");
//nsmgr.AddNamespace("soap12", "http://schemas.xmlsoap.org/wsdl/soap12");
//nsmgr.AddNamespace("http", "http://schemas.xmlsoap.org/wsdl/http");
//nsmgr.AddNamespace(String.Empty, "http://www.e-wavegroup.com");
nsmgr.AddNamespace("wsdl", "http://schemas.xmlsoap.org/wsdl");
XmlNodeList SNameNodes = doc.DocumentElement.SelectNodes("//wsdl:definition/wsdl:service", nsmgr);
List<serviceName> snList = new List<serviceName>();
foreach (XmlNode node in SNameNodes)
{
System.Console.WriteLine("The service name is " + node.Attributes["name"].Value);
}
}