I have this xml file: http://www.studiovincent.net/list.xml
I need copy whole content in other xml file.
I tryed this code:
string sourcefile = "http://www.studiovincent.net/list.xml";
string destinationfile = "test.xml";
System.IO.File.Copy(sourcefile, destinationfile);
But not work, because I get this error: URI formats are not supported.
How Can I solve this problem?
I would recommend using
WebClient.DownloadFile. Downloading a string and then saving it could cause problems with character set mapping.This copies the file directly rather than converting the data to a string, which might do some string conversions (for example, the file is Unicode, and
WebClientthinks it’s UTF-8) and then copying to a file.