There's a Microchip application note that shows you how to do it. Sorry but I don't have a link but search Microchip's site for 'Transformerless', also search Google, there have been many usenet posts.
You use the reactance of the cap to drop the voltage and then rectify it.