http://bugs.winehq.org/show_bug.cgi?id=24325
--- Comment #6 from ocean04@suomi24.fi 2011-07-03 10:58:19 CDT --- Looked this and here is what I found.
First and last line of saved XML doesn't contain \r, it was stripped.
domdoc.c: domdoc_save
ctx = xmlSaveToIO(domdoc_save_writecallback, domdoc_save_closecallback, handle, NULL, XML_SAVE_NO_DECL);
If change that to:
ctx = xmlSaveToIO(domdoc_save_writecallback, domdoc_save_closecallback, handle, "UTF-8", XML_SAVE_NO_DECL);
-> 
 is replaced with
Not sure if related, but read answer: http://mail.gnome.org/archives/xml/2011-June/msg00013.html
Maybe just strip remaining \r in "node_set_content"? Not exactly same XML as Windows, but \r may not be possible using libxml2..