Also it sometimes puts </group> or </inkscape></group> at the end of the file.
Resetting preferences is not a solution - because we put time into making our own preferences. Right now I fix the XML by editing it and deleting the line that is corrupt.
Inkscape still corrupts the file from time time - probably related to WACOM because it has a bug in very long lines like that:
<group
id="devices">
<group
keys="& lt;Primary& gt;< Shift> <Alt& gt;< Mod2> <Mod3& gt;< Mod4> <Mod5& gt;;< Primary& gt;< Shift> <Alt& gt;< Mod2> <Mod3& gt;< Mod4> <Mod5& gt;;< Primary& gt;< Sh
...
Also it sometimes puts </group> or </inkscape></group> at the end of the file.
Resetting preferences is not a solution - because we put time into making our own preferences. Right now I fix the XML by editing it and deleting the line that is corrupt.