A continuous density function technique has been developed for X-ray diffraction (XRD) structural investigations of mesostructured materials. The technique is designed for the analysis of the density distribution in materials exhibiting nanoscale (2-50 nm) ordering of structural elements without atomic long-range order. The results of structure investigations of a series of silicate, metallosilicate and carbon mesostructured materials with hexagonal and cubic symmetry are presented.