Extract information from an xml file

I have an xml file looks like this

<report> #root element
  <bindingsite id="1" has_interactions="True">
    <interactions> #child elements
      <hydrophobic_interactions/> #the sub-child elements I want to get name
      <hydrogen_bonds>
        <hydrogen_bond id="1">
          <resnr>25</resnr>
          <restype>ASN</restype>
          #Lots of elements after this
        </hydrogen_bond>
        <hydrogen_bond id="2">
          <resnr>26</resnr>
          <restype>ALA</restype>
          #Lots of elements after this
        </hydrogen_bond>
        <hydrogen_bond id="3">
          <resnr>26</resnr>
          <restype>ALA</restype>
          #Lots of elements after this
        </hydrogen_bond>
        <hydrogen_bond id="4">
          <resnr>102</resnr>
          <restype>THR</restype>
          #Lots of elements after this
        </hydrogen_bond>
      <water_bridges/>
      <salt_bridges>    #the sub-child elements I want to get name
        <salt_bridge id="1">
          <resnr>29</resnr>
          <restype>ARG</restype>
          #Lots of elements after this
        </salt_bridge>
        <salt_bridge id="2">
          <resnr>187</resnr>
          <restype>ASP</restype>
          #Lots of elements after this
        </salt_bridge>
      </salt_bridges>
    </interactions>
  </bindingsite>
</report>

I need to make a Python script to extract the value of the <resnr> and <restype> from all the sub-child elements and print with this format

'sub-child element 1 name' 'resnr1''restype1' 'resnr2''restype2' 'resnr3''restype3'
'sub-child element 2 name' 'resnr1''restype1' 'resnr2''restype2' 'resnr3''restype3'

for example, for the above xml file

hydrogen_bonds 25ASN 26ALA 26ALA 102THR
salt_bridge 29ARG 187ASP

Appriciate any help!

For this I have used the module lxml.

from lxml import etree
xml_parser = etree.XMLParser(encoding='utf-8', recover=True)
xml_tree = etree.parse(
        file_name,  # This is the path to the file with the XML
        parser=xml_parser
    )

Afterwards you can iterate over all XML elements with

for element in xml_tree.iter():
    # Do what you want to do with them

or iterate over specific elements (resnr in this case)

for element in xml_tree.iter('resnr'):
    # Do what you want to do with them

The text inside an XML element is stored in its text attribute. element.text would be 102 for the element <resnr>102</resnr>, for example.