xml - save a tree as a key in a dictionary, Python 3.4 -
I have hundreds of XML files I have been working to compare 2 XML trees and if they are the same Each XML tree has unique ID numbers which has been ignored in comparison.
Now I can iterate and compare all XML files. But I want to save the trees in the data structure like dictionaries but the dragon does not allow me to save the tree as a key and its id as a value. Is there a way in the form of the dictionary key of a tree? If not, what kind of data structure can be used for this?
Example:
The dictionary is Hashmap, which means that the keys should be harmful, which usually indicates that the item is washed (Due to these lists are not valid keys, but Tuples are).
What you need is a function that generates this hash to generate a hash on the data structure like tree for your objects. There is a trivial problem. But, since you can already create equality, you should have an idea about some features that make your data recognizable.
You always have the feature vector
Comments
Post a Comment