What programs can I use to validate HTML/XML markup? 

Basically, I want a local, command-line based, version of [W3C HTML validation service](http://validator.w3.org/) (like `lint`) that I can use for detecting errors.

**Update**

I would also accept a solution that uses the W3C web service from the command line.

**Related Questions:**

[How can I validate HTML offline?](https://webmasters.stackexchange.com/questions/1802/how-can-i-validate-html-offline)