asp.net中,使用XDocument操作XML
来源:互联网 发布:服务端面试常见算法题 编辑:程序博客网 时间:2024/06/05 00:32
Label lblState = (Label)dvProjectDetails.FindControl("lblState");
XDocument xdocSolvers = XDocument.Load(Server.MapPath("~/config/solvers.xml"));
string sDescription = "";
//CommonConfig.SolverCollection.SolverMainCollection
foreach (var item in xdocSolvers.Element("Solvers").Elements())
{
if (item.Attribute("Name").Value == ViewState[@"SolverName"].ToString())
{
foreach (var item2 in item.Elements())
{
if (item2.Attribute("Value").Value == ViewState[@"SolverVersion"].ToString())
{
sDescription = item2.Element("Type").Element("Description").Attribute("Value").Value;
break;
}
}
break;
}
}
lblState.Attributes.Add("onmouseover", "tooltip.show('"+sDescription+"');");
lblState.Attributes.Add("onmouseout", "tooltip.hide();");
// add for tooltip
if (sState != "Finished")
{
Label lblState = (Label)dvProjectDetails.FindControl("lblState");
string sDescription = "";
string solver = ViewState[@"SolverName"].ToString();
string version = ViewState[@"SolverVersion"].ToString();
string type = ViewState[@"OsType"].ToString();
if (CommonConfig.SolverCollection.SolverMainCollection.ContainsKey(solver))
{
if (CommonConfig.SolverCollection.SolverMainCollection[solver].SolverVersionCollection.ContainsKey(version))
{
if (CommonConfig.SolverCollection.SolverMainCollection[solver].SolverVersionCollection[version].SolverTypeCollection.ContainsKey(type))
{
sDescription = CommonConfig.SolverCollection.SolverMainCollection[solver].SolverVersionCollection[version].SolverTypeCollection[type].Description;
if (!string.IsNullOrEmpty(sDescription))
{
lblState.Attributes.Add("onmouseover", "tooltip.show('" + sDescription + "');");
lblState.Attributes.Add("onmouseout", "tooltip.hide();");
}
}
}
}
}
XDocument xdocSolvers = XDocument.Load(Server.MapPath("~/config/solvers.xml"));
string sDescription = "";
//CommonConfig.SolverCollection.SolverMainCollection
foreach (var item in xdocSolvers.Element("Solvers").Elements())
{
if (item.Attribute("Name").Value == ViewState[@"SolverName"].ToString())
{
foreach (var item2 in item.Elements())
{
if (item2.Attribute("Value").Value == ViewState[@"SolverVersion"].ToString())
{
sDescription = item2.Element("Type").Element("Description").Attribute("Value").Value;
break;
}
}
break;
}
}
lblState.Attributes.Add("onmouseover", "tooltip.show('"+sDescription+"');");
lblState.Attributes.Add("onmouseout", "tooltip.hide();");
// add for tooltip
if (sState != "Finished")
{
Label lblState = (Label)dvProjectDetails.FindControl("lblState");
string sDescription = "";
string solver = ViewState[@"SolverName"].ToString();
string version = ViewState[@"SolverVersion"].ToString();
string type = ViewState[@"OsType"].ToString();
if (CommonConfig.SolverCollection.SolverMainCollection.ContainsKey(solver))
{
if (CommonConfig.SolverCollection.SolverMainCollection[solver].SolverVersionCollection.ContainsKey(version))
{
if (CommonConfig.SolverCollection.SolverMainCollection[solver].SolverVersionCollection[version].SolverTypeCollection.ContainsKey(type))
{
sDescription = CommonConfig.SolverCollection.SolverMainCollection[solver].SolverVersionCollection[version].SolverTypeCollection[type].Description;
if (!string.IsNullOrEmpty(sDescription))
{
lblState.Attributes.Add("onmouseover", "tooltip.show('" + sDescription + "');");
lblState.Attributes.Add("onmouseout", "tooltip.hide();");
}
}
}
}
}
- asp.net中,使用XDocument操作XML
- XDocument操作xml文件基本操作
- asp.net操作xml
- asp.net操作xml
- ASP.NET操作XML
- asp.net操作XML
- asp.net操作xml
- asp.net操作xml
- asp.net操作xml
- asp.net 操作xml
- asp.net 操作 XML
- Asp.net 操作XML
- ASP.NET操作XML
- ASP.NET操作XML
- asp.net 操作xml
- Asp.net 操作XML
- ASP.NET操作XML
- ASP.NET中使用Treeview和XML
- ubuntu server 11.10 install GUI
- oracle及postgresql递归查询
- 字符设备学习总结
- Python内置函数清单
- 用Openssl建立私有CA并颁发证书
- asp.net中,使用XDocument操作XML
- 基于linux系统下的MYSQL自动备份
- 内核模块开发基础
- Eclipse GBK支持添加
- 关于:CSDN首页> 软件研发 [探讨] 代码审查:究竟是好主意还是坏主意?
- eclipse+VC6.0开发JNI注意要点
- 单元测试的四大具体效益
- Linux中的物理和虚拟存储空间布局
- Ubuntu下使用MySQL数据库验证访问的SVN服务器的搭建