You would have to use old, likely used parts so you could do it quite cheaply. Then you could never really connect it to the internet safely.
You can just use a VM to run XP on a new machine. That's the easiest thing to do unless you just like having old hardware sitting around. You still need the license though.
http://www.howtogeek.com/228689/how-to-make-old-programs-work-on-windows-10/