<<...is it possible to format hdd and install windows XP from a USB flash drive?>>
Hmmm...if the BIOS supports booting from USB devices, it seems possible to install XP from a USB drive...at first glance. And I don't believe that every BIOS supports USB device booting.
The problem that I see is that the USB drivers are not loaded until the chipset drivers are installed...which says to me that no USB device can become bootable before that happens. To contrast, the drivers for an optical drive are loaded onto the XP install CD, facilitating install via recognized optical drive.
But, I've been wrong before
This is one of those things that I would not know until I tried it.