How could i add all xml element names (distinct) to a dictionary with xml.etree.cElementTree.iterparse

19 Views Asked by At
def count_tags(osm_file):
    found = {}
    for event, elem in ET.iterparse(osm_file):

Id like to get with xml.etree.cElementTree.iterparse form a huge file the xml root and the top level tags and add them disticnt to a dict. May there someone could help me please.

0

There are 0 best solutions below