title: Find path to the node using ElementTree
body: <p>Wih <a href="https://docs.python.org/3/library/xml.etree.elementtree.html" rel="nofollow noreferrer">ElementTree</a>, I can print every occurences of a specific tag (in my case <code>ExpertSettingsSg</code>
  ):</p>
  
  <pre><code>#!/usr/bin/env python3
  
  import xml.etree.ElementTree as ET
  
  root = ET.parse('mydoc.xml').getroot()
  
  for children in root:
      value=children.findall('.//ExpertSettingsSg')#tag I'm looking for
      for settings in value:
          if settings.text is not None:
              print(settings.text)
  </code></pre>
  
  <p>But I didn't find a way to print the path of the occurence. Because my XML file has many levels and because <code>ExpertSettingsSg</code> can be almost at every level, I need to know where the <code>ExpertSettingsSg</code> come from. I'm looking for something like </p>
  
  <blockquote>
    <p>Path to config xxxxxx = /root/xxx/aaaa/bbbb</p>
  </blockquote>
  
  <p>If it's not possible with <a href="https://docs.python.org/3/library/xml.etree.elementtree.html" rel="nofollow noreferrer">ElementTree</a>, does any other library do the trick?</p>
  
  <p>Thanks </p>