xml py and R code