Esempio n. 1
0
        public static void SaveConfig(string node, string property, string value)
        {
            //参数说明  node:节点  property:属性  value:值
            //示例
            //xml的写入方法,如下:写入config/calcu 的属性auto
            //Hashtable autorun = new Hashtable();
            //autorun.Add("autorun", "auto1");
            //xmlfilehelper.UpdateNode(_fileName, "/config", autorun, autorun);

            //注意,本方法要求在xml文件中不能有<!--注释列,否则会出错。

            XmlFileHelper xmlfilehelper = new XmlFileHelper();
            Hashtable     nodeproperty  = new Hashtable();

            nodeproperty.Add(property, value);
            xmlfilehelper.UpdateNode(_fileName, node, nodeproperty, nodeproperty);
        }