In this paper results of the analysis of urine samples of healthy children and children with a congenital cyanotic heart defect and after heart transplantation are presented. The analysis of urine samples was carried out by X-ray fluorescence spectrometry with wavelength dispersion and using CRM urine Seronorm as a reference. It was found that for patients with a congenital cyanotic heart defect the loss of electrolytes like Na, Cl and K was increased. Moreover, urine samples of children from areas of different degree of environmental pollution were analysed. We observed (as expected) higher concentrations of heavy metals in the urine of children from ecological polluted areas.