As far as I know you cannot calculate XANES with VASP. However, if you have atomic coordinates of your system you can use FEFF code instead.
What FEFF actually does is in principle similar to VASP, because it calculates the electronic structure of the system first and based on that produces a theoretical XANES spectrum. This last step is a bit tricky because the actual shape of the XANES depends on number parameters in FEFF.
Basically, if you have the electronic density of states from VASP you almost have your XANES spectrum because XANES simply pictures the density of unoccupied states above Fermi energy.