I have 2 files and I don't really understand what parameters need to be passed so that they combine correctly.
Example:
File 1:
<?xml version='1.0' encoding='UTF-8'?>
<yml_catalog date='2022-09-28 23:32'>
<shop>
<categories>
<category id='61'>Category 1</category>
</categories>
<offers>
<offer id='123'>
<name>Test 1</name>
</offer>
</offers>
</shop>
</yml_catalog>
File 2:
<?xml version='1.0' encoding='UTF-8'?>
<yml_catalog date='2022-09-28 23:31'>
<shop>
<categories>
<category id='41'>Category 2</category>
</categories>
<offers>
<offer id='456'>
<name>Test 2</name>
</offer>
</offers>
</shop>
</yml_catalog>
Need to get a result:
<?xml version='1.0' encoding='UTF-8'?>
<yml_catalog date='2022-09-28 23:32'>
<shop>
<categories>
<category id='61'>Category 1</category>
<category id='41'>Category 2</category>
</categories>
<offers>
<offer id='123'>
<name>Test 1</name>
</offer>
<offer id='456'>
<name>Test 2</name>
</offer>
</offers>
</shop>
</yml_catalog>
I have 2 files and I don't really understand what parameters need to be passed so that they combine correctly.
Example:
File 1:
File 2:
Need to get a result: