zoukankan      html  css  js  c++  java
  • 保存与设置 XML的方法

                string parms = @"<?xml version=""1.0"" encoding=""UTF-8""?>
                                <Params>
                                 <ExcelRule>{0}</ExcelRule>
                                 <ExcelFile>{1}</ExcelFile>
                                 <Handle>{2}</Handle>
                                 <SavePath>{3}</SavePath>
                                </Params>";

                parms = string.Format(parms, _excelRule, _excelFile, this.Handle, _excelSavePath);

                XmlDocument doc = new XmlDocument();
                doc.LoadXml(parms);
                doc.Save(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"ExcelToGSP\Params.xml"));


                //XmlDocument doc = new XmlDocument();
                //doc.Load(AppDomain.CurrentDomain.BaseDirectory + @"ExcelToGSP\Params.xml");
                //doc.SelectSingleNode("Params/ExcelRule").InnerText = ExcelRule;
                //doc.SelectSingleNode("Params/ExcelFile").InnerText = ExcelFile;
                //doc.SelectSingleNode("Params/Handle").InnerText = ExcelHandle;
                //doc.SelectSingleNode("Params/SavePath").InnerText = SavePath;

  • 相关阅读:
    git command
    互联网应用架构概览-学习笔记
    机器学习基础概念-阿里大学课程学习笔记
    Python的并行求和例子
    C语言处理CSV数据
    Pattern Evaluation
    Python写的大小写转换小工具
    处理输入为非对角阵的Clustering by fast search and find of density peak代码
    css点击下层穿透上层元素
    浏览器全屏效果
  • 原文地址:https://www.cnblogs.com/chenqingwei/p/2020165.html
Copyright © 2011-2022 走看看