A novel combined SAXS/WAXS/XAFS setup for studying the self-assembly processes occurring during the crystallization of porous materials, such as ZnAlPO-34, is described. In a single experiment, it has been possible to obtain congruent and time-resolved information on aggregation processes in the synthesis gel, the incorporation process of Zn2+ ions in the framework, and the formation of the crystalline material.