how do i read / write to a remote xml file with vb.net?
Check out System.Xml.XmlDocument
. Its Load
method will allow you read a UNC or a URL.
Writing the remote document may present some security challenges. Some questions may arise like:
- do you have write permissions to overwrite the document after reading and modifying its contents in-memory?
- is the document on an internal network?
If it's really remote. I'd suggest wrapping access in a webservice:
If it's a local xml file, or on a LAN, I'd access it directly.
If you have an xml file on a server that is somewhere on the internet , or somewhere on a WAN:
Write the code that deals with the XML, and allows access to the data in it in a webservice by selecting an appropriate set of functions that can be used remotely.
In your example in the comments, you say you have about 100 arrays with 100 items each, I'd assume each array has an indexing reference.
The back-end could be XML, or even a database. To transfer data you could have the webservice with:
GetArray(index) : get's an array by index, returns XML or even maybe CSV. It could return an error code if the index is not found.
PutArray(index,data) : puts data an array by index, data is XML or even maybe CSV.
DelArray(index) : deletes an array from the back-end storage.