zoukankan      html  css  js  c++  java
  • 添加 XML内Rows数据

          
            public static void addItemToXml(string method,string firstKey,string id,string checkName,string refValue)
            {
                XmlDocument xDoc = new XmlDocument();
                xDoc.Load(txtValueHelper.txtValue);
                XmlNode xNode = xDoc.SelectSingleNode("Check");
                XmlElement xRoot = xDoc.CreateElement("CheckTable");
                xRoot.SetAttribute("ID", id);
                XmlElement xMethodName = xDoc.CreateElement("MethodName");
                xMethodName.InnerText = method;
                xRoot.AppendChild(xMethodName);
                XmlElement xFirKey = xDoc.CreateElement("MethodArgs");
               xFirKey.InnerText = firstKey;
               xRoot.AppendChild(xFirKey);
               // XmlElement xCheckid = xDoc.CreateElement("Checkid");
               // xCheckid.InnerText = id;
               // xRoot.AppendChild(xCheckid);
                XmlElement xCheckName = xDoc.CreateElement("CheckName");
                xCheckName.InnerText = checkName;
                xRoot.AppendChild(xCheckName);
               // xRoot.AppendChild(xCheckid);
                XmlElement xRefValue = xDoc.CreateElement("RefValue");
                xRefValue.InnerText = refValue;
                xRoot.AppendChild(xRefValue);
                XmlElement xCheckValue = xDoc.CreateElement("CheckValue");
                xCheckValue.InnerText = "1";
                xRoot.AppendChild(xCheckValue);
                xNode.AppendChild(xRoot);
                xDoc.Save(txtValueHelper.txtValue);
                MessageBox.Show("Add Sucess.");
            }
    

      

  • 相关阅读:
    jQuery Mobile方向感应事件
    Linq-多条件查询
    linux top命令详解
    在Python中调用C++,使用SWIG
    linux下core文件调试方法
    如何设置、查看以及调试core文件
    标准C++中的string类的用法总结(转)
    实用make最佳实践
    GDB多进程调试(转)
    GDB详解
  • 原文地址:https://www.cnblogs.com/EthanSun/p/3183386.html
Copyright © 2011-2022 走看看