XHTML does have some advantages compared with ordinary HTML, such as the parsing being more consistent, since the file will specify where literal text is used and which commands are or are not a block that is expected to contain other things.
(It could still try to render in case of an error, but display the error message as well, perhaps.)