当前位置: 首页>>代码示例>>C#>>正文


C# XmlDocumentExtender.GetSingleNodeValue方法代码示例

本文整理汇总了C#中Discuz.Common.Xml.XmlDocumentExtender.GetSingleNodeValue方法的典型用法代码示例。如果您正苦于以下问题:C# XmlDocumentExtender.GetSingleNodeValue方法的具体用法?C# XmlDocumentExtender.GetSingleNodeValue怎么用?C# XmlDocumentExtender.GetSingleNodeValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Discuz.Common.Xml.XmlDocumentExtender的用法示例。


在下文中一共展示了XmlDocumentExtender.GetSingleNodeValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadWebSiteConfig

 /// <summary>
 /// 装载WebSite信息
 /// </summary>
 private void LoadWebSiteConfig()
 {
     #region 装载主题信息
     XmlDocumentExtender doc = new XmlDocumentExtender();
     doc.Load(configPath);
     XmlNodeList topiclistNode = doc.SelectNodes("/Aggregationinfo/Aggregationdata/Websiteaggregationdata/Topiclist/Topic");
     XmlNodeList website_spacelistnode = doc.SelectNodes("/Aggregationinfo/Aggregationpage/Website/Forum/Topiclist/Topic");
     XmlNodeInnerTextVisitor topicvisitor = new XmlNodeInnerTextVisitor();
     XmlNodeInnerTextVisitor pagetopicvisitor = new XmlNodeInnerTextVisitor();
     forumlist.Text = "";
     int i = 0;
     foreach (XmlNode topic in topiclistNode)
     {
         topicvisitor.SetNode(topic);
         bool isCheck = false;
         foreach (XmlNode index in website_spacelistnode)
         {
             pagetopicvisitor.SetNode(index);
             if (topicvisitor["topicid"].ToString() == pagetopicvisitor["topicid"].ToString())
             {
                 isCheck = true;
                 break;
             }
         }
         forumlist.Text += "<div class='mo' id='m" + i + "' flag='f" + i + "'><h1><input type='checkbox' name='tid' " + (isCheck ? "checked" : "") + " value='" + topicvisitor["topicid"] + "'>" + topicvisitor["title"] + "</h1></div>\n";
         i++;
     }
     topnumber.Text = doc.GetSingleNodeValue(doc.SelectNodes("/Aggregationinfo/Aggregationpage/Website/Forum")[0], "Bbs/Topnumber");
     showtype.SelectedValue = doc.GetSingleNodeValue(doc.SelectNodes("/Aggregationinfo/Aggregationpage/Website/Forum")[0], "Bbs/Showtype");
     #endregion
 }
开发者ID:wenysky,项目名称:dnt31-lite,代码行数:34,代码来源:aggregation_forumaggset.aspx.cs

示例2: LoadWebSiteConfig

 private void LoadWebSiteConfig()
 {
     #region 绑定自动推荐相册
     //装载配置文件
     XmlDocumentExtender doc = new XmlDocumentExtender();
     doc.Load(configPath);
     XmlNode albumconfig = doc.SelectSingleNode("/Aggregationinfo/Aggregationpage/Albumindex/Albumconfig");
     focusphotoshowtype.SelectedIndex =  Convert.ToInt32(doc.GetSingleNodeValue(albumconfig, "Focusphotoshowtype"));
     focusphotodays.Text = doc.GetSingleNodeValue(albumconfig, "Focusphotodays");
     focusphotocount.Text = doc.GetSingleNodeValue(albumconfig, "Focusphotocount");
     recommendalbumtype.SelectedIndex = Convert.ToInt32(doc.GetSingleNodeValue(albumconfig, "Focusalbumshowtype"));
     focusalbumdays.Text = doc.GetSingleNodeValue(albumconfig, "Focusalbumdays");
     focusalbumcount.Text = doc.GetSingleNodeValue(albumconfig, "Focusalbumcount");
     weekhot.Text = doc.GetSingleNodeValue(albumconfig, "Weekhot");
     #endregion
 }
开发者ID:khaliyo,项目名称:DiscuzNT,代码行数:16,代码来源:autoalbums.aspx.cs

示例3: GetForumAggregationTopicListOrder

 /// <summary>
 /// 获取聚合首页自动推荐主题列表的排序规则
 /// </summary>
 /// <returns></returns>
 public TopicOrderType GetForumAggregationTopicListOrder()
 {
     if (topicOrderType == null)
     {
         XmlDocumentExtender doc = new XmlDocumentExtender();
         doc.Load(Utils.GetMapPath(BaseConfigs.GetForumPath + "config/aggregation.config"));
         topicOrderType = (TopicOrderType)TypeConverter.ObjectToInt(doc.GetSingleNodeValue(doc.SelectNodes("/Aggregationinfo/Aggregationpage/Website/Forum")[0], "Bbs/Showtype"));
     }
     return (TopicOrderType)topicOrderType;
 }
开发者ID:khaliyo,项目名称:DiscuzNT,代码行数:14,代码来源:ForumAggregationData.cs


注:本文中的Discuz.Common.Xml.XmlDocumentExtender.GetSingleNodeValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。