如何在winform中向XML文件插入数据啊?
知道怎么用winform创建一个XML文件了,就是不知道怎么继续向已有的XML文件里继续插入数据啊?程序代码:
XmlTextWriter writer = new XmlTextWriter("hello.xml", System.Text.Encoding.UTF8); writer.WriteStartDocument(true); writer.Formatting = Formatting.Indented; writer.Indentation = 2; writer.WriteStartElement("Table"); createNode(IDTextBox.Text, nameTextBox.Text, gender.Text, writer); writer.WriteEndElement(); writer.WriteEndDocument(); writer.Close(); MessageBox.Show("XML File created ! ");