Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import xml.etree.ElementTree as ET
- tree = ET.parse('country_data.xml')
- root = tree.getroot()
- child = root.findall("./channel/item")
- for c in child:
- title = c.find("title").text
- desc = c.find("description").text
- print title, desc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement