//1.读取html内容
string htmlUrl = @"new\new.html";
string htmlContent = string.Empty;
using (StreamReader reader = new StreamReader(htmlUrl))
{
htmlContent += reader.ReadToEnd();
}
//2.修改html内容
string htmlContentNew = "新的html内容";
using (StreamWriter sw = new StreamWriter(url, false))
{
sw.Write(htmlContentNew );
}
//3.修改XML文件
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(xmlpath);
//修改节点-增加或删除或其他操作
//修改后要保存到XML文件中
using (XmlTextWriter xmlWriter=new XmlTextWriter(xmlpath,Encoding.UTF8))
{
xmlDoc.WriteTo(xmlWriter);
}