An interesting post at 24ways about diagnostic styling, they talk about making CSS rules to highlight problems with your code.
I think I would do it by writing a script to parse the XHTML and display the errors, but this approach would be good for someone like a designer who prefers information in a visual form.
I think both ways are good, just choose whichever one works for you, or perhaps both.