$ emacs -q
Create an XML buffer with the following:
<foo>
<!-- comment -->
</foo>
Now C-x h M-; to comment out everything. Text becomes this:
<!-- <foo> -->
<!-- <\!-- comment -\-> -->
<!-- </foo> -->
which is not valid XML. This is even suggested by the mode itself. "<\!--" should be "<!-\-" instead. Uncommenting should also take that into account.