Last active
September 9, 2020 12:38
-
-
Save mariopesch/de992c4d38c072ee74526685e3b649d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from xml.dom import minidom | |
import collections | |
xmldoc = minidom.parse('Sketch_Name.xml') | |
itemlist = xmldoc.getElementsByTagName('block') | |
print(len(itemlist)) | |
blocks = [] | |
#print(itemlist[0].attributes['type'].value) | |
for s in itemlist: | |
print(s.attributes['type'].value) | |
blocks.append(s.attributes['type'].value) | |
print(collections.Counter(blocks).most_common()) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment