move xml validation to own module