|
-
Jul 3rd, 2003, 07:02 PM
#1
Thread Starter
Lively Member
XML File Access
Hi there;
I'm writing an application and I need to modify an XML file on my web server. I have read through previous posts, and in one of them somebody suggested that the only way to do this is to download the XML file and then re-upload it. This is fine with me, except I have absolutely no idea how to re-upload it.
I found this code earlier:
Imports System.Net
Imports System.Diagnostics
~~~
Dim w As WebClient = New WebClient
Dim p As Process = New Process
Addy = source
filen = target
w.DownloadFile(Addy, filen)
Which lets me download a file. I have also modified the code from http://vbforums.com/showthread.php?s=&threadid=251962 to let me load an XML file into a combo box.
So... I can download the XML file into a combo box. That is easy. The reason I mentioned the first code snippet is because I am wondering whether it is easier to use the w.DownloadFile (or w.DownloadData?) and download the XML file to a directory, and then use the w.UploadFile or w.UploadData to put the updated XML file back on the server?
Or:
As long as I set write permissions oin the server, can I write directly back to the XML file?
Thanks! (I hope I made sense! LOL)
Sean
P.S. My web server is Windows 2003, development environment is MS VS .NET Enterprise Architect
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|