I have a dynamic products xml file that i need to load from an external source and save in a db table. Now i want to keep the xml file which contains current products in synch with what is in the table. so I want to make sure I update products with IDs in both xml and db table, insert new products and delete those products that are obsolete in db table (they are not in xml file) see illustrations below
XML file mapping
Productid->1 and product-name->book,
Productid->2 and Prouct-name->pen
Now table below
ID Name1 book
3 pencil
Now I want to update product ID 1 with info from xml, insert product ID 2 from xml into table and delete product ID 3 from table since it's not found in xml
Please any help is appreciated.