为什么生成的XML支持中文呢!!
{ string sql = " select * from Sys_Area ";
//连接数据库生成dataSet
DataSet ds = HengXian.DbHelperSQL.DbHelperSQL.Query(sql);
string s= " <?xml version=\ "1.0\ " encoding=\ "utf-8\ " standalone=\ "yes\ "?> \r\n ";
s+= " <?xml-stylesheet type=\ "text/xsl\ " href=\ "a.xsl\ "?> \r\n ";
s += " <item> " + "\r\n ";
for (int i = 0; i < ds.Tables [0].Rows.Count; i++)
{
//ds.Tables[0].Rows[i][ "AreaName "].ToString() 为中文
s += " " + " <item Text=\ " " + ds.Tables[0].Rows[i][ "AreaName "].ToString() + "\ " " + " ";
s += "NavigateUrl=\ " " + "overlapping_edges.aspx+ "+ "kk " + "\ " "+ " ";
s += "DefaultSubItemLookId = \ "Level2Tab\ " ";
s += " DefaultSubItemSelectedLookId =\ "SelectedLevel2Tab\ " > "+ "\r\n ";
s += " "+ " <item Text=\ "Top Stories\ " NavigateUrl=\ "overlapping_edges.aspx?page=top_stories\ " /> " + "\r\n ";
s += " " + " </item> " + "\r\n ";
}
s += " </item> > ";
string filename = "feng ";