日期:2014-05-17 浏览次数:20827 次
private void button1_Click(object sender, EventArgs e)
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(System.Windows.Forms.Application.StartupPath + "\\UpdateList.xml");
XmlNode listNode = xmlDoc.DocumentElement;
XmlNodeList xList = xmlDoc.GetElementsByTagName("App");
foreach (XmlNode node in listNode.ChildNodes)
{
foreach (XmlNode xNode in xList)
{
string name = xNode.Attributes["Version"].Value;
textBox1.Text += "更新至:" + name + "\r\n" + node.InnerText.ToString().Trim().Replace(" ", "") + "\r\n\r\n";
}
}
}
<?xml version="1.0" encoding="gb2312"?>
<AutoUpdate>
<App Version="2.5.6" >
<Description>
1.增加打印菜单
2.修复了BUG
3.发发阿达
4.个顶个我
</Description>
</App>
<App Version="2.5.5" >
<Description>
1.增加打印菜单
2.修复了BUG
3.发发阿达
4.个顶个我
</Description>
</App>
</AutoUpdate>