By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

XMLTextWriter how to write more values ?

P: n/a
Hi All
I have a simple question as i am a newbie in xml.
I am using XmlTextWriter to write some values to an xml file . I use
XmlTextWriter textwriter = new XmlTextWriter ("path",null);
to create the xml doc.
I want to append some values to the doc when next time my main form
loads
So I use same statement in the Form_Load
XmlTextWriter textwriter = new XmlTextWriter ("path",null);
Then the question is how can I "append" some other values instead of
overwriting the old ones ?
Thx for answers
Koray Atsan
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Koray Atsan wrote:
Then the question is how can I "append" some other values instead of
overwriting the old ones ?


You cannot. There are some hacky workarounds, but basically the answer
is - you cannot. XML is tree and to append to a tree you have to reparse
it. INstead of XmlWriter load XML into XmlDocument, append values and
save back.

--
Oleg Tkachenko [XML MVP, XmlInsider]
http://blog.tkachenko.com
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.