xml_data = """<location>
   <city>
      <name> New York</name>
      <type>non-capital</type>
   </city>
   <city>
        <name> London</name>
        <type>capital</type>
   </city>
</location>"""
from lxml import etree as ET
parser = ET.XMLParser(recover=True)
tree = ET.fromstring(xml_data, parser)
print(tree.xpath('//city'))
cities = [[c.text for c in n if c.tail] for n in tree.xpath('//city')]
How to retrieve all child nodes in a single query using lxml & XPATH