I know that elements (ex. Ag) have spectral/emission/absorption lines, but do chemical compounds (ex. NaCl) have spectral lines as well? Ones that when seen you can tell that that compound (NaCl) is made up of certain elements (Na and Cl).
In icp analysis the sample is heated to a temperature in which you don't have compounds and you detect only elements by their emissions.
For compounds there is absortion or fluorescence in which the sample is at near room temperature mostly.
Of course this too general, and the technique to use depends on what you are looking for and where because each technique has its strengths and weakness.