seperman / deepdiff

DeepDiff: Deep Difference and search of any Python object/data. DeepHash: Hash of any object based on its contents. Delta: Use deltas to reconstruct objects by adding deltas together.
http://zepworks.com
Other
1.99k stars 218 forks source link

Please add option to diff xml (for xhtml and svg files) #391

Open Emasoft opened 1 year ago

Emasoft commented 1 year ago

Is your feature request related to a problem? Please describe. Deepdiff doesn't support direct xml trees comparison and hashing.

Describe the solution you'd like Add option to diff xml trees (for xhtml and svg files), and to hash compare nodes ignoring the node id (to be able to find duplicate nodes differing only by the id).

Describe alternatives you've considered An alternative is to use xml2dict to convert xml to json. But using xml2dict is not ideal when working with lots of xml attributes, namespaces and scripts when comparing xhtml and svg files in a web project.

seperman commented 1 year ago

Hi @Emasoft I have never used the https://github.com/martinblech/xmltodict library. Do you recommend against it because it changes the path of the xml elements?