Application of X-ray resonant diffraction to structural studies of liquid crystals