Greetings
I want to append records in a XML file,I use XMLTextWriter,but i found it
only create a XML file,not append records in exist XML file.why?
-------------------------------------------------
XmlTextWriter myXmlTextWrite = new XmlTextWriter(@"C:\myconfig.xml");
myXmlTextWrite.WriteStartDocument();
myXmlTextWrite.WriteStartElement("Record");
myXmlTextWrite.WriteStartElement("Topic");
myXmlTextWrite.WriteString(XMLTopic);
myXmlTextWrite.WriteEndElement();
myXmlTextWrite.WriteEndElement(); //end Record
myXmlTextWrite.WriteEndDocument();
myXmlTextWrite.Flush();
myXmlTextWrite.Close();
=================================================
i should use XMLDocument?
------------------------------
XmlDocument xmldoc= new XmlDocument();
xmldoc.Load(@"C:\myconfig.xml");
xmldoc.DocumentElement.AppendChild() //????????