I think the key point is this:
Note that comments are markup.
http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4
This is not valid markup:
<div <span/> />
… so neither is the one you mention.
Since all my sites are written in PHP I normally comment out code with PHP comments:
<?/*?>
<div>...</div>
<p>...</p>
<?*/?>
Perhaps you can use a similar trick.