is one of the classical methods to determine the major elements (Si-P) and trace elements ((As)-Zr); in some cases you can also extend this procedure to Ag, In, I, Te etc. or enhance the detection limit of LREE such as Ce, La, dependant upon the sample preparation making use either as fusion beads or pellets
You can make use of the characteristic radiation of each element to detect and quantify them. Apart from this procedure run in a lab, XRF can also be run as portable XRF in the field and allow you to cover a large area within a reasonable period of time by capturing digital chemical data in the field instead of the laboratory. The detection range may be a bit lower but these shortcomings are compensate by the speeding up of the data collection.
It is of importance for normal granites as well as mineralized rocks.