note
FloydATC
I'd say that the reason why the parser does not complain about line 8 is that it has no valid reason to say an ERROR element cannot contain another ERROR element.
<p>
In order for the parser to know this you would have to use a DTD to describe the valid document tree.
<p>
Consider this syntactically valid set of tags:
<code>
<ERROR>
<FOO>
</FOO>
<ERROR>
<BAR>
</BAR>
</ERROR>
</ERROR>
</code>
Now, if you remove the last line, the XML becomes invalid. It would be tempting to fix the problem in line 4 but this would give a completely different document structure.
<p>
<div class="pmsig"><div class="pmsig-616809">
--
Time flies when you don't know what you're doing
</div></div>
828156
828156