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;
  • 相关阅读:
    次小生成树模板(poj1679)
    ISAP模板
    ZOJ3781
    Uva12663
    LightOJ1089
    网络流DINIC模板
    FZU2030(括号匹配)
    NOIP2011提高组(选择客栈)
    DRF之视图家族
    DRF多表设计与ModelSerializer组件
  • 原文地址:https://www.cnblogs.com/tatsuya/p/674026.html
Copyright © 2011-2022 走看看