I dont know about XRY analysis but XRF analysis gives you data about all major oxides and trace elemental content of the rock.
You can correlate the chemical analysis with observed mineralogy by petrography or to certain you can recalculate based on major oxide data the mineralogy of rock i,.e., lime stone/ dolostone/quartzite/shale etc.
The triangular diagram with quartz/feldspar/ lthic fragments will give you the tectonic setting.