Documents are finished with a
closes any open tags, prevents any further accidental writes from
occurring to the writer, and if the writer was created with
xmlWriterNewToFile(), it closes the file handle.
The content of a writer created with
still availble (via
xmlWriterEndDocument is called.