How are your resulting database contents supposed to look like after your update?
Dave Kopecek dave.kopecek@gmail.com schrieb am Fr., 17. Aug. 2018, 17:27:
Hi All,
Given a database created from catalog.xml below. What's the best way to update & add records received daily as in file daily-update.xml ?
Coming from relational DBs & new to this. I ultimately need to script/automate this. Hoping there's some magic command I'm missing & looking for best way to approach the problem.
Thanks, -Dave
catalog.xml
<?xml version="1.0" encoding="UTF-8"?>
<CATALOG> <ENTRIES> <ENTRY> <SKU>1</SKU> <TITLE>Empire Burlesque</TITLE> <ARTIST>Dylan</ARTIST> <PRICE>10.90</PRICE> </ENTRY> <ENTRY> <SKU>2</SKU> <TITLE>Hide your heart</TITLE> <ARTIST>Bonnie Tyler</ARTIST> <PRICE>9.90</PRICE> </ENTRY> </ENTRIES> </CATALOG>
daily-update.xml
<?xml version="1.0" encoding="UTF-8"?>
<CATALOG> <ENTRIES> <ENTRY> <SKU>1</SKU> <PRICE>19.90</PRICE> <NEWTHING>I wasn't here before the update</NEWTHING> </ENTRY> <ENTRY> <SKU>1971</SKU> <TITLE>Tupelo Honey</TITLE> <ARTIST>Van Morrison</ARTIST> <PRICE>8.20</PRICE> </ENTRY> </ENTRIES> </CATALOG>