Emmanuel said:
Is it possible to append data to XML file,
No, at least not for most normal meanings of the term.
It's fundamental that an XML document has "closure". This is a good
feature, as it allows easy automatic detection of a truncated document.
It's achieved by enforcing the constraint that all XML documents have
one, and only one, root element. It's then obvious that the last
content in the XML file must be the end tag of this root element.
Unfortunately this also makes it impossible to continually append to an
XML file, at least by writing extra nodes to the end of it. You _could_
do it by opening the document and re-serialising it correctly, moving
the root's end tag onwards, but that's tricky too.
In general, the solution adopted is to not store well-formed XML in
these files, but rather to store a list of otherwise well-formed XML
elements (which may have structure within them, as usual). If you need
to parse the docuemnt as XML, just add the tags for the root element
before throwing the file's contents at the parser.