Yeah it's the same for ps3. Either a HDMI-DVI cable or HDMI-VGA cable does the trick.
This usually doesn't work for sound, though you probably already knew that.
P.S If you're using the same monitor for both the xbox and ps3, what
you could do is use VGA for your xbox and DVI for your ps3, so as you can just press the 'source' button on your monitor as oppose to unplugging them each time you switch.
BTW what monitor you using? :p
Edited once, 5/1/11 - 3:11am.
Posted on Wednesday, 5th January 2011