I recently found (forget the source, a mailing list or blog comment somewhere I think) the Iris Syntax Highlighter, which consists of a command line tool, .NET component, and an online app for generating highlighted source code in HTML (among other formats). It understands almost 500 syntaxes, including C#, XML, and various SQL flavours.
You can download the whole lot and host it locally if you like, or just use the hosted version. It is published under a combined X11/Vim licence.
So rather than my usual, ugly code samples, I’ll now make sure I post in glorious colour. The code will probably still be ugly, but at least it will be syntax highlighted ;-)