I have a task that is very cumbersome, as I have to do it by hand (my company bought a tool for a ludicrous amount of money that doesn't work anymore).
I have two XML lists, each of them has half of it missing, so I need to piece it together into a third one before sending it to the system. As well as changing the header to the date I'm sending the file.
I've managed to set up the input for the date, it's easy enough to ask the user for the input. But the rest of the task is driving me mad, I tried many things I've found around here and on the Microsoft forums, to no avail... this task is killing me because I'm the only one that is "tech savvy" to do it (it's literally monkey job of copying and pasting text from XMLs).
It's not trucks and cars, obviously, and there are more files than two, but they all are like this: one kind has only cars, with an empty truck node, and the other has trucks but with empty cars node.
Example of File 1
<?xml version="1.0" encoding="utf-8"?> <document> <header> <startDate>01/01/2020</startDate> <endDate>01/02/2020</endDate> </header> <body> <cars> <car> <ID>1</ID> <Name>Blue Car</Name> </car> <car> <ID>2</ID> <Name>Red Car</Name> </car> </cars> <trucks> </trucks> </body> </document> Example of File 2
<?xml version="1.0" encoding="utf-8"?> <document> <header> <startDate>01/01/2020</startDate> <endDate>01/02/2020</endDate> </header> <body> <cars> </cars> <trucks> <truck> <ID>1</ID> <Name>Blue Truck</Name> </truck> <truck> <ID>2</ID> <Name>Red Truck</Name> </truck> </trucks> </body> </document> Example of File 3
<?xml version="1.0" encoding="utf-8"?> <document> <header> <Date>03/02/2020</Date> </header> <body> <cars> <car> <ID>1</ID> <Name>Blue Car</Name> </car> <car> <ID>2</ID> <Name>Red Car</Name> </car> </cars> <trucks> <truck> <ID>1</ID> <Name>Blue Truck</Name> </truck> <truck> <ID>2</ID> <Name>Red Truck</Name> </truck> </trucks> </body> </document>