prepare data before xml parsing