Adsorption and capillary condensation of an organic fluid in a periodic mesoporous silica ͑SBA-15͒ are studied by in situ synchrotron diffraction. Powder diffraction patterns resulting from the two-dimensional hexagonal packing of the cylindrical pores of SBA-15 are collected as a function of vapor pressure during continuous adsorption and desorption of the fluid ͑perfluoropentane C 5 F 12 ͒, using a specially designed sorption cell. Seven diffraction peaks with systematic changes of the intensity are resolved as the adsorbed film thickness increases along the adsorption isotherm. The integrated intensities of the diffraction peaks are analyzed with a structural model involving four levels of electron density ͑dense silica matrix, microporous corona around the pores, adsorbed film, and core space of the pores͒. The model provides quantitative information about the structure of the evacuated specimen, the filling of the corona, and the growing thickness of the liquid film with increasing pressure. A very good fit of the data by this model is found for relative pressures up to p / p 0 Ϸ 0.5, but the fit of the high-indexed diffraction peaks becomes poor close to the capillary condensation pressure ͑p / p 0 Ϸ 0.68͒. Tentatively, this fact may be attributed to a deviation of the liquid film structure from the simple flat geometry close to the phase transformation, presumably caused by density fluctuations.