Trace analysis of environmental samples by x-ray emission spectroscopy