• c#读取带命名空间的xml


    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <GetAuthorizationCodeResponse xmlns="http://tempuri.org/">
          <GetAuthorizationCodeResult>boolean</GetAuthorizationCodeResult>
        </GetAuthorizationCodeResponse>
      </soap:Body>
    </soap:Envelope>
    var doc = new XmlDocument();
                var namespaceManager = new XmlNamespaceManager(doc.NameTable);
                namespaceManager.AddNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
                namespaceManager.AddNamespace("xsd", "http://www.w3.org/2001/XMLSchema");
                namespaceManager.AddNamespace("soap", "http://schemas.xmlsoap.org/soap/envelope/");
                namespaceManager.AddNamespace("mynamespace", "http://tempuri.org/");
                doc.LoadXml(result.ResultData);
                var resultNode = doc.SelectSingleNode(@"soap:Envelope/soap:Body/mynamespace:GetAuthorizationCodeResponse/mynamespace:GetAuthorizationCodeResult", namespaceManager);
  • 相关阅读:
    App Inventor
    App Inventor趣味编程(网易课堂)
    学习App Inventor
    小学课程资源网
    mariadb数据类型
    docker监控容器
    docker网络
    项目——基于httpd镜像演示Dockerfile所有的指令
    Dockerfile介绍及指令详情
    docker——harbor
  • 原文地址:https://www.cnblogs.com/nanfei/p/2622034.html
Copyright © 2020-2023  润新知