码迷,mamicode.com
首页 > 其他好文 > 详细

读Xml

时间:2016-03-18 17:31:01      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:

 

        private static bool ReadXmlFileSet()
        {

            bool ReadXmlFileSet = false;
            string appPath = "";
            string _appPath = "";
            //读取Xml数据信息对象
            ReadWriterXml w_ReadWriterXml = new ReadWriterXml();
            //读取结果
            string Value = "";

            try
            {
                //根目录
                _appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
                //**********取得程序根目录***********文件名*****//
                appPath = Common._appPath + "\\" + "SysConfig.xml";


                //读取值************************路径*******节点*********Key********//
                Value = w_ReadWriterXml.ReadXml(appPath, "Section", "Key");
               

                ReadXmlFileSet = true;

            }
            catch (Exception ex)
            {
                throw ex;
            }

            return ReadXmlFileSet;
        }

  

 

读Xml

标签:

原文地址:http://www.cnblogs.com/lhlong/p/5292774.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!