I guess the question is asked from the viewpoint of elemental composition or ratios. Say for eg. for AB2O4 compound, by measuring the relative ratio of A,B and O, is it possible to determine its chemical formula?
It can be done (but only in some cases). Unfortunately it requires good understanding of X-ray spectroscopy and its software. Also suitable standards are needed.