Parsing the xml files and write into database