X-ray fluorescence analysis was applied to assess the ecological state of the area potentially polluted by emissions of the aluminum industry and heat power engineering. Soil and pine needle samples were collected in areas with industrial activity and analyzed using wavelength-dispersive X-ray fluorescence (WDXRF) and total-reflection X-ray fluorescence (TXRF) techniques. Both techniques were validated using the matrix-matched certified reference materials. Different sample preparation procedures, such as fusion and pressing for WDXRF and acid digestion and suspensions for TXRF as well as quantification approaches (the external calibration for WDXRF and the internal standard for TXRF) were applied according to the features of the analyzed samples. The rock-forming oxides (Na2O, MgO, Al2O3, SiO2, P2O5, K2O, CaO, TiO2, MnO, and Fe2O3) and trace elements (V, Cr, Ni, Cu, Zn, Rb, Sr, Y, Ba, and Pb) were quantified in soils, as well as several elements (Na, Mg, Al, Si, P, S, Cl, K, Ca, Ti, Cr, Mn, Fe, Ni, Cu, Zn, Br, Rb, Sr, Pb, and Ba) were quantified in pine needles. Comparing the results of soils and pine needles analysis with the regional background values indicated a significant contamination pollution level of the studied area.