X-ray diffraction of multilayers and superlattices