Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
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.