1. Inside the driver's door jamb: Open the driver's door and look at the doorjamb (the vertical section between the door and the body of the car). There should be a sticker with various information about the car, including the paint code.
2. Underneath the hood: Open the hood of your Xterra and look at the underside of the hood. The paint code may be printed on a sticker there.