X-ray chemical analysis