Hello,

I have an application "X" which is responsible for:
- Collecting a data from lab
- Open or create an xml file
- Fill the xml file with the data collected

Simultaneously, another application say "Y" is reading this xml and updating the data retrieved in a GUI. Application Y is only reading the xml while X has read and write access. So far so good but since the data is collected over a couple of days and is asynchronous and meanwhile in huge blocks, I am facing difficulty in serializing.

Code:
RecieveData(double aX, double aY, double aZ) //In application X
{
            _fStream = new FileStream(mFileName, FileMode.OpenOrCreate);
            _xmlSerialize = new XmlSerializer(typeof(Data));
            _3dData.Coordinates.Add(aX, aY, aZ);
            _xmlSerialize.Serialize(_fStream, _3dData);    //_3dData.Coordinates is a list
            _fStream.Close();
}

PlotData(string aTargetFile) //In application Y
{
            _sourceFileXml = aTargetFile;
            FileStream fs = new FileStream(_sourceFileXml, FileMode.Open, FileAccess.Read);
            XmlSerializer xs = new XmlSerializer(typeof(Data));
            _plot = (Data)xs.Deserialize(fs);
            fs.Close();
}
Problem:
----What you can see in above code is that I receive a single set of coordinate at a time. I add it to a list and then I serialize the whole data again and then I close the _fStream.
----The above method I find inefficient as I am opening and closing stream and serializing from the beginning _3dData.Coordinate.

Question:
-----Is there any method to keep the stream open and just append the new coordinates to the xml file and at the same time keep on reading the xml file from application Y without opening and closing stream there too?