110,538
社区成员
发帖
与我相关
我的任务
分享
XmlDocument xml = new XmlDocument();
xml.Load("http://218.213.212.29/PaymentSvc/PayWebService.asmx?wsdl");
XmlNamespaceManager xnm = new XmlNamespaceManager(xml.NameTable);
xnm.AddNamespace("s", "http://www.w3.org/2001/XMLSchema");
string xpath = "//s:complexType/s:sequence/s:element";
XmlNodeList nodes = xml.SelectNodes(xpath, xnm);
foreach (XmlNode item in nodes)
{
string min = item.Attributes["minOccurs"].InnerText;
string max = item.Attributes["maxOccurs"].InnerText;
string title = item.Attributes["name"].InnerText;
string type = item.Attributes["type"].InnerText;
}