Well, the Athlon XP motherboards are AGP only, so no good mining video card will fit.
P4 on the other hand, comes in several varieties, including socket 775, so at least these will fit into pretty much any socket 775 motherboard. It will be powerful enough for mining, even on multiple video cards. Just make sure, since you're looking at used systems, that the motherboard actually has any x16 pci-express slots (some motherboards, particularly from oem manufacturers, use integrated graphics and don't have any pci-express slots for discrete video cards).