You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Wong Kok Wai <wo...@pacific.net.sg> on 2000/02/10 09:55:00 UTC

Appending to a XML document

A general XML question:

What's the most efficient way of appending data to a XML document? Let's
say I'm implementating a log file using XML. If I choose DOM, I need to
parse the file to DOM, get the document element, append the child node
and serialise back to file. I can't think of anyway using SAX. Even if
possible, I still need to parse the whole file once. For a normal text
file, I just need to open the file with the append option set to true,
write the data and close the writer. Should something smiliar be
available as an API for XML?