파이썬 XML파싱 질문있습니다..

Gamjago의 이미지

안녕하세요 PY4E라는 입문? 책을 보고 공부를 하고 있는데, XML파싱을 하려는데 계속 오류가 납니다.
어떻게 해야될지 전혀 감이 안오는데, 오류가 왜 나는 건가요?
일단은 코드는 이렇구요,

import xml.etree.ElementTree as ET
from xml.etree.ElementTree import Element, dump, ElementTree
 
try:
    tree = ET.parse('CIV4LeaderHeadInfos.xml')
except:
    try:
        xm=input('Directory: ')
    except:
        print("Error: typed wrong directory.")
        quit()
    tree = ET.parse(xm)
 
root = tree.getroot()
##print(root)
ltag = root.findall("LeaderHeadInfo")
print(ltag)
print(ltag[0].find("Type").text)

이건 제가 파싱하려는 XML파일인데, Type부분의 텍스트를 출력하고 싶은데, ltag가 빈 리스트만 리턴하는데 어떻게 하면 될까요?

<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (<a href="http://www.xmlspy.com" rel="nofollow">http://www.xmlspy.com</a>) by Alex Mantzaris (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Leader Infos and AI Settings -->
<Civ4LeaderHeadInfos xmlns="x-schema:CIV4CivilizationsSchema.xml">
	<LeaderHeadInfos>
		<LeaderHeadInfo>
			<Type>LEADER_BARBARIAN</Type>

(~~~~생략~~~~)

실행결과는 이렇습니다.

[]
Traceback (most recent call last):
File "C:\Users\aaaa5\Desktop\Study\Python\LeaderXML.py", line 32, in
print(ltag[0].find("Type").text)
IndexError: list index out of range

File attachments: 
첨부파일 크기
Plain text icon XML파일1.65 MB