Hi Experts.
I need to figure out a way to append to a XML file instead of overwriting it while recording my "logging events".
As the logging process is running overwriting the file with XDocument.Save(FilePath) function the process gets slower and slower and slowweeeerrrr as the XML file keeps on growing. I realize it's happening because XDocument.Save() function completely wipes and overwrites the XML file every time its executed.
So..
I have an <Event> XElement .
Somewhere within the XDocument I have a <Events> tag that I need to put it under.
How can I "Stream" my Xelement to the right XDocument tag without having to do
Xdocument.Add()
Xdocument.Save() which, as mentioned deletes and overwrites the XML file, affecting my program performance.
Thank you!!