本文整理汇总了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
}
示例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
}
示例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;
}