Best way to achieve that is stop using VB6 and never return to it.
If by some weird reason you cannot do it, the right approach is using DOM interface. Parse XML into DOM, make all modifications on DOM and store DOM as XML file at the same location. The file will be opened and closed twice during this course of operations.
See this article explaining how to do it:
http://www.techrepublic.com/article/creating-xml-documents-with-the-dom-in-vb6/1044759[
^].
—SA