X-ray scattering study of quantum wires and lateral periodic heterostructures