This is the new code for parsing xml file