code to transfer data from old xml files into database

porting code