zoukankan      html  css  js  c++  java
  • 提取xml文件显示

    1\

    /*** 提DataSet*/

    2\
    DataSet ds = new DataSet();
       ds.ReadXml(p_strXmlPath);
         
       dataGrid1.DataSource=ds;
       dataGrid1.DataMember="user";

    3\
      FileStream fs = new FileStream(p_strXmlPath,FileMode.Open,FileAccess.Read);
     StreamReader Reader = new StreamReader(fs,System.Text.Encoding.Default);
           
      DataSet ds = new DataSet();
      ds.ReadXml(Reader);
      txtName.Text=ds.GetXml();
      string physicalName =dt.Rows[0]["username"].ToString();
    4\
    XmlDocument xmlD = new XmlDocument();
       xmlD.Load(p_strXmlPath);
      //XmlNamespaceManager xmlns = new XmlNamespaceManager(xmlD.NameTable);   //带 xmlns的处理
        
      XmlNode root = xmlD.SelectSingleNode("myinfo");           //,xmlns;
      MessageBox.Show(root.InnerText);
  • 相关阅读:
    nginx和tomcat访问图片和静态页面的配置方法
    centos7上mysql5.6版本主从复制
    centos7上编译安装mysql5.6
    js去除空格
    屏蔽F1~F12的快捷键的js函数
    js屏蔽浏览器(IE和FireFox)的刷新和右键等功能
    禁止选中页面内容-兼容ie、firefox、chrome
    js获取网页上选中的部分,包含html代码
    一个账号只能在一个地方登陆一次
    c#创建window服务
  • 原文地址:https://www.cnblogs.com/flashicp/p/787213.html
Copyright © 2011-2022 走看看