Chemistry of metal-organic frameworks monitored by advanced X-ray diffraction and scattering techniques