Notice that xmlns
without prefix in XML declares default namespace, and descendants element without prefix inherit default namespace from ancestor implicitly. Now to find element in namespace you can
define a prefix that references the namespace URI, and use combination of that prefix and target element's local name :
....
ns = { 'd': 'http://example.com/schema' }
for country in root.findall('d:ResponseDate', ns):
rank = country.find('d:emailid', ns).text
name = country.find('d:number', ns).text
print(name, rank)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…