hello All,
I'd like to ask about how to create a C# program in order to access one XML via network.
I make a program that can let more than one user in a speart machines
can read and write in just one XML file. Are there limitations on using
XML file and is there XML engin with C# to do that
Thank you in advance
Razek

XML multi-users access
puppyfriend
thank you for your response.
Actually, we have created a testing experamentation and we have distrbuted on a LAN so we can accamulate the data from a lot of users. we already used C# with XML. The problem came after instulations, where, we got a bug that the XML file can not save all users results. We are working sicnce 8 months and to change to a new data base like sql or orcal is so diffcult for us reght now. my question is "can we find a way to access XML (read and write) via a LAN"
thank you
Razek
hahientrang
Razek,
The limitations are more or less likely the limitations with a any file.
In order to access it, you have to open, read, update and close the file. If two processes act on the same time, one of the processes will not be able to access the file, especially if you are updating the file.
There will be performance problems: if the XML file is big, if there are too many accesses.
If the XML file will be a read only file storing settings etc., then it should work ok.
If you mention more on what you are planning to do, then I could give more advice.
Kitsune
XML file is no different from all other files. When you open it you may specify sharing options:
FileStream constructor
File.Open
By default, FileShare.Read is used. You may specify, for example, FileShare.None to prohibit sharing. Here you can find description of FileShare enumeration:
http://msdn2.microsoft.com/en-us/library/system.io.fileshare.aspx
Hope it helps,
Anton
technisat