zoukankan      html  css  js  c++  java
  • C#操作xml

     1XmlDocument xmlDocument = new XmlDocument();
     2                XmlNodeList NodeListControls;
     3                XmlNodeList node_style_status;
     4                string path = System.Windows.Forms.Application.StartupPath;
     5                int end = path.LastIndexOf("\\", path.Length);
     6                //path = path.Substring(0, end);
     7                XmlDocument xmlDocumentRuleName = new XmlDocument();
     8                XmlNodeList NodeListRuleName;
     9                if (strXML != null)
    10                {
    11                    xmlDocument.Load(strXML);
    12                    node_style_status = xmlDocument.SelectNodes("/xml/stylestatus");
    13                    style_status = Convert.ToInt32(node_style_status[0].InnerText);
    14                    //MessageBox.Show(style_status.ToString());
    15                    Select_Style(style_status);
    16                    NodeListControls = xmlDocument.SelectNodes("/xml/item");
    17                    xmlDocumentRuleName.Load(path + "\\XMLFileRules.xml");
    18                    NodeListRuleName = xmlDocumentRuleName.SelectNodes("/xml/item");
    19                    for (int i = 0; i < NodeListControls.Count; i++)
    20//NodeListControls[i].ChildNodes[0].InnerText;
  • 相关阅读:
    python 文件读写操作(转抄)
    kubernetes之kubeadmin安装部署
    bash之字符串处理(核心重点)
    blocking and nonblocking
    文件格式转换
    解压.asar
    Cocos Creator Editor 编辑器扩展记录
    CocosCreator 警告:Please set node's active instead of rigidbody's enabled
    Unity 垂直翻转位图颜色数据
    CocosCreator 动态设置属性在Properties面板显示/隐藏
  • 原文地址:https://www.cnblogs.com/tatsuya/p/674026.html
Copyright © 2011-2022 走看看