0

I'm working on a project where I need to detect changes in two XML files, generated at different times.

The XML files contain airport data, runways, obstacles etc. so a lot of nested information, and only a fraction of the airports in the file are relevant.

I've tried the xmldiff module but it takes a long time to run and obviously returns information not relevant to the airports I'm interested in.

I've decided to write a python script to extract only the airports I need from the XML's, and store the data in two separate dictionaries, I will then compare them and try to identify the changes.

Could anyone advise on whether this is the correct way to go about the problem? Any advice at all is much appreciated!

Thanks

1
  • 1
    Sure, why not? Implement it, test it and if it gets the thing done, you have written a useful application. Commented Apr 13, 2022 at 13:19

1 Answer 1

2

Extracting the airports and saving them in a data structure that you can compare feels like a good way to approach the problem to me. Depending on how you handle duplicates you could think about using dictionaries (one key - multiple values) or sets (no duplicates). Here is a pretty good explanation on how to compare the contents of two different sets.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.