Chemical Analysis Based on X-Ray Absorption Measurements. Solids and Liquids