• 读取xml文件


     1 string filePath = string.Format(System.Web.HttpContext.Current.Server.MapPath("~/XML/PostConfig/{0}.xml"), postId);
     2                         
     3                         if (System.IO.File.Exists(filePath))
     4                         {
     5                             #region 读取xml
     6                             //XmlDocument xmlDoc = new XmlDocument();
     7                             //xmlDoc.Load(filePath);
     8                             //System.Xml.XmlNodeList xnl = xmlDoc.SelectSingleNode("PostConfigInfo").ChildNodes;
     9 
    10                             //foreach (XmlNode xn in xnl)
    11                             //{
    12                             //    XmlElement xe = (XmlElement)xn;
    13                             //    defaultHomeUrl = xe.GetAttribute("templateUrl").ToString();
    14                             //    defaultTheme = xe.GetAttribute("themeName").ToString();
    15                             //}
    16                             #endregion
    17
    1 <PostConfigInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="0" postGuid="" postName="11" displayName="222" departmentGuid="" departmentName="">
    2   <ThemeTemplateInfo recordNum="UTM-201703140001" disaplyName="选项卡门户" englishName="HXProtal" themeID="4" themeLanguage="en" themeName="default" templateID="9" templateLanguage="en" templateName="Foreign.aspx" themeDisaplyName="Blue" templateUrl="Foreign" navUrl="Controls/NAV/CommonNavControl.ascx">

    这种方式不可取?

    收藏
    关注
    评论
  • 相关阅读:
    mac配置ls命令显示不同文件不同颜色
    nginx安装
    PostgreSQL的架构
    /etc/sysctl.conf配置文件
    pg_hba.conf配置文件
    gitlab不支持mysql,这就是我学习PostgreSQL的原因
    postgresql安装
    git的三个区域比较
    mysql备份时的快照原理
    mysql密码管理
  • 原文地址:https://www.cnblogs.com/yidengbone/p/6861638.html
Copyright © 2020-2023  润新知