vb.net xml file editing?

Man of Honour
Joined
11 Mar 2004
Posts
76,637
I'm going to be making a new program, but I've only made web pages before using MS sql server. However this is going to be a standalone program, using xml files as data storage. oe the program will have several user xml files and 1 core xml file which the user can download from an internet server. How ever is it passable for that user to connect to the server and add entries to the xml file.

If so how would you do it? Does the server just need the xml file, or would it need other stuff?

Any help appreciated.
 
Well you've got two options really:
  1. Develop your own method of communicating with the server that allows you to edit the XML data live. If you take this route you'll want to have a look at the System.Net and System.Net.Sockets namespaces.
  2. Download and cache the XML file, make your changes to it, and then upload it when you're done (via FTP for example).

Of course, if you go with the second option, you'll have to worry about access concurrency, i.e. one client downloading the data, then another downloading, the first uploading the changes, and then the second uploading its changes and overwriting the first client's changes.
 
Last edited:
would it be easier to store that info in a ms sql server than create a xml from that. I assume you can create an xml file from a database relatively easy.
 
Well, why do you want to use XML in the first place? If you're storing the data in a database on the server, then you could just have the clients communicating directly with that database.
 
Inquisitor said:
Well, why do you want to use XML in the first place? If you're storing the data in a database on the server, then you could just have the clients communicating directly with that database.

I wanted to make it a standalone application, with user only connecting and downloading when needed. It wont be that often. But I suppose with the difficulty of xml It would just be easier to use a database. It's only a spare time hobby thing, so don't wont it to be to complicated.
 
It's up to you really, but the problem with trying to directly access/modify an XML file on the server is that the client application would need access to the server's file system, which is obviously out of the question.
 
Back
Top Bottom