S
S
Sergey Goryachev2016-03-24 02:00:00
linux
Sergey Goryachev, 2016-03-24 02:00:00

How to find differences in two XML files?

There are two files: yandex_2016-03-15.xml and yandex_2016-03-24.xml .
These are export files to Yandex.Market from the supplier of our online store.
Every 2-3 days you need to check the files and make changes to our store.
Prices may change and new products may be added.
Processing and adding is carried out manually by managers, since we do not add all the goods.
But how do you find the changes made to a file by comparing the two, the new one and the old one?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
abcd0x00, 2016-03-24
@webirus

It's better to load the xml into a tree and compare those trees with the output of the differences. In theory, you need a good python script. Without knowledge, it will be difficult to write.

S
Saboteur, 2016-03-24
@saboteur_kiev

xml is essentially text, so there are two options here
or you use the usual diff
or you write a parser, load the data into an array / table and compare it there.

G
GoodChief, 2019-07-18
@GoodChief

I would recommend Microsoft XML Notepad .
Convenient to compare (View -> Comprare XML Files)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question