Added a writer for the XML output format.
Added the copyright notice and some comments.