У меня есть глубокий вложенный тег xml Movie, доступ к которому я хочу получить напрямую с помощью xpath
.
<?xml version='1.0' encoding='utf8'?>
<collection>
<genre category="Action">
<decade years="1980s">
<movie favorite="True" title="Indiana Jones: The raiders of the lost Ark">
<format multiple="No">DVD</format>
<year>1981</year>
<rating>PG</rating>
<description>
'Archaeologist and adventurer Indiana Jones
is hired by the U.S. government to find the Ark of the
Covenant before the Nazis.'
</description>
</movie>
</decade>
</genre>
</collection>
</xml>
Как получить доступ к тегу movie
и его атрибутам?
Я пытался использовать
root = etee.tostring(above_xml)
print root.xpath("movie")
[]
но я ничего не получаю.