/// <summary>
/// 修改XML
/// </summary>
/// <param>test</param>
public static void ChangeXml(string test)
{
string xmlPath = "config";//当前文件夹下的config
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(xmlPath);
XmlNodeList settings = xmlDoc.SelectNodes("configuration/applicationSettings/setting");
foreach (XmlNode node in settings)
{
XmlNode valueNode = node.SelectSingleNode("value");
string[] uri = valueNode.InnerText.Split(‘/‘);
valueNode.InnerText = "http://" + test + "/" + uri[uri.Length - 1];
}
xmlDoc.Save(configPath);
}