X-ray nondestructive testing was used for flaw location, for examination of the content of a package, and for fault detection. However, a monoenergetic beam can determine only the density variations of the analyzed object, not its structure. Study of the structure of an object was carried out by dual-energy X-ray beams. It is established that materials have different dependences of the X-ray extinction coefficient on its energy. The possibility of determination the composition of the material using two polychromatic X-ray beams with different energy spectra is shown. A variant of the algorithm for determination of the atomic number Z in the case of a weakly absorbing material is proposed.