0

Greetings,

My app saves a bunch of stuff to an XML file. This is my line of code-

Using writer As XmlWriter = XmlWriter.Create("C:\vdx2k\MWS\RE\EXTReportsInbox\TK" & frmCitation.txtCiteNumber.Text & "Traff.xml", settings)

So that saves it at that specific location.

I need to duplicate the XML and have it also save in another location. I've been at this for days, Googling, searching, trying different things and now I need to turn here for help.

Any ideas?

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by mrbungle
0
  1. Use File.Copy to copy the XML file you just created.
  2. Open two XmlWriter in your Using block and duplicate the part where you actually write.
  3. Make your code a method taking a path/filename and call it twice.
0

Thanks for the quick reply Momerath. I got it to work with your suggestion, thanks!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.