Small-angle scattering of X-rays (SAXS) or neutrons (SANS) is one of the few experimental methods that can in principle be used for the in situ study at the mesoscopic scale of physicochemical phenomena occurring inside nanoporous solids. However, the potential of the method is often limited by the lack of suitable data analysis methods to convert scattering data into real-space structural information. This is notably the case for most porous materials of practical interest, which exhibit a hierarchical structure with micro, meso, and macropores, with often a secondary material confined in the pores, such as in supported catalysts, as well as fuel-cell and battery materials. In the present paper, we propose a general analysis of X-ray scattering by this type of material. Assuming that each structural level is statistically independent from the others and has a distinct characteristic length scale, compact mathematical expressions are derived for the scattering of the entire hierarchical structure. The results are particularized to the SAXS analysis of SBA-15-ordered mesoporous silica loaded with copper nitrate as well as of supported catalysts obtained after heat treatment of that material. The SAXS data analysis shows that the nitrate fills both the micro- and mesopores of the material, while the metallic copper obtained after heat treatment is found only in the mesopores. Moreover, the mesoscopic-scale spatial distribution of the metal depends on the heat treatment, in line with earlier electron tomography studies. The main ideas underlying the SAXS data analysis were presented in a recent communication (Gommes Angew. Chem., Int. Ed. 2015, 54, 11804−11808). Here, we generalize the approach and provide a comprehensive discussion of how any level in a hierarchical structure contributes to its overall scattering pattern. The results, as well as the general modeling methodology, will be of interest to anyone interested in the quantitative analysis of small-angle scattering data of empty or loaded porous solids and more generally of any type of hierarchical material