X-ray diffraction studies of thin films and multilayer structures