can i install windows xp in compaq presario cq56
Almost certainly. But you will probably have to find your own drivers. I doubt compaq will provide XP drivers for it. But if you can do that or find someone to do it for you, sure.
The common problem installing XP on newer systems from the big oem's like Dell or HP is a blue screen during the install process which is usually an AHCI issue. Just switch it to IDE in the bios if you can or slipstream the drivers.