To find all permission tags, try iterating over the nodes that dom.getElementsByTagName('uses-permission') returns instead of accessing only the node at index 0 :
from xml.dom.minidom import parseString data = '' with open('/root/Desktop/AndroidManifest.xml','r') as f: data = f.read() dom = parseString(data) nodes = dom.getElementsByTagName('uses-permission')
or if you want only permission, not xml, you can replace node.toxml() with node.getAttribute('android:name') .
source share