Warning: I have no clue about how to work with XML.
I have a simple application whose only purpose is to persist ten properties about an object (a log, if you will). I wrote it rapidly and it writes the properties by appending them to a plain text file. Problem solved.
Now, I read that for simple applications like this one XML would be a good alternative. I don't plan to change my script (being so simple, it works very well), but that left me thinking.
Say you want to create a log using XML.
How do you write an entry to it?
Do you read the whole XML file, append the entry, and rewrite the whole thing again? What I don't understand is how to "append" to an XML file, considering that you cannot "append" to the middle of a plain text file without reading it, parsing it, and writing it again.
Please orient me.
Cheers.