It's going to be difficult, if not impossible, and is more likely to fail than succeed.
It's not a downgrade, but a complete reformat and install as there is no mechanism from within Win 7 to 'revert to XP', and the problem is going to be finding the drivers for XP, including those SATA hard drive drivers, as XP, knows nothing about SATA. Also, if the hard drive is larger than 127GB, XP (without any Service Packs), will not recognise the additional GBs.
Your best bet is to visit the Compaq web site, input your make and model computer, and see if Compaq offer any help and the driver package required in installing XP on this system. You will need the motherboard and chipset drivers, sound, video, ethernet drivers, and any other drivers for it. And also a method for installing the SATA drivers, during the install procedure.
Make sure you backup all of your personal files first, and then "have a plan in place" for reinstalling Win 7 if it all fails.
There will be no support for this, either from Compaq or Microsoft.
is posible to downgrade my OS windows 7 to xp?
im using compaq presario cq62.,