add function to get data from xml file