funtion to create xmlfrom location