string xml = "";
XmlDocument xmldoc = new XmlDocument();
xmldoc.LoadXml(xml);
XmlNamespaceManager xnm = new XmlNamespaceManager(xmldoc.NameTable);
xnm.AddNamespace("SOAP-ENV","http://schemas.xmlsoap.org/soap/envelope/");
xnm.AddNamespace("Mo","http://www.monternet.com/dsmp/schemas/");
xmldoc.SelectNodes("//SOAP-ENV:Header/Mo:TransationID",xnm);//注意,就算是用默认命名空间的节点,也要为命名空间定义一个名字,并使用这个名字。
今天知道xmlns这个东西叫命名空间了。

相关文章:

  • 2022-12-23
  • 2021-10-19
  • 2021-12-02
  • 2022-12-23
  • 2021-08-29
  • 2021-08-21
  • 2022-12-23
猜你喜欢
  • 2022-02-04
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
相关资源
相似解决方案