Nondestructive analysis (NDA) based on x-ray emission is widely used, for example, in the semiconductor and concrete industries. Here, we demonstrate significant quantitative and qualitative improvements in broadband x-ray NDA by combining particle-induced emission with detection based on superconducting microcalorimeter arrays. We show that the technique offers great promise in the elemental analysis of thin-film and bulk samples, especially in the difficult cases where tens of different elements with nearly overlapping emission lines have to be identified down to trace concentrations. We demonstrate the efficiency and resolving capabilities by spectroscopy of several complex multielement samples in the energy range 1-10 keV, some of which have a trace amount of impurities not detectable with standard silicon drift detectors. The ability to distinguish the chemical environment of an element is also demonstrated by measuring the intensity differences and chemical shifts of the characteristics x-ray peaks of titanium compounds. In particular, we report measurements of the Kα=Kβ intensity ratio of thin films of TiN and measurements of Ti Kα satellite peak intensities in various Ti thin-film compounds. We also assess the detection limits of the technique, comment on detection limits possible in the future, and discuss possible applications.