Generate xml string in js instead of php;read existing xml file and import data to table
Clean generated xml when importing data