Another tips on emacs. Use James Clark's nxml mode, it is a fantastic XML mode that validates document on the fly. It is handy to edit Docbook document.
It can also be used to edit XHTML pages. No need to run the document through a validator as the errors will be highlighted on the fly. This software is just too good for words and helps me create valid HTML document quicker.
The screenshot belows show a document with intentional errors. All errors are underlined red. If you move the cursor on the error, it will display more information on the status bar.
| Nxml mode in action |
There is package ready to install on Debian testing called nxml-mode.