c#生成站点地图(SiteMapPath)文件示例程序
本文导语: 代码如下://创建站点地图 private void CreateSiteMap(DataSet ds) { XmlDeclaration declareation; declareation = xmlDoc.CreateXmlDeclaration("1.0", "UTF-8", null); xmlDoc.AppendChild(declareation...
//创建站点地图
private void CreateSiteMap(DataSet ds)
{
XmlDeclaration declareation;
declareation = xmlDoc.CreateXmlDeclaration("1.0", "UTF-8", null);
xmlDoc.AppendChild(declareation);
XmlElement xeRoot = xmlDoc.CreateElement("siteMap");
xmlDoc.AppendChild(xeRoot);
XmlElement xroot = xmlDoc.CreateElement("siteMapNode");
xroot.SetAttribute("title", "");
xroot.SetAttribute("url", "#");
xeRoot.AppendChild(xroot);
for (int i = 0; i