Is it still connected to the internet via your VM? If so..then no - the XP VM could still get compromised...doesn't matter if it's a VM or not - it's still connected to a network.
There's also known malware that can transfer from the VM to the host OS and infect it, so that's something else to keep in mind.
Is there a reason you need XP?