title: Read all XML files under multiple directories using python
body: <p>I am using Pandas through Jupyter Notebooks. I have 10 XML files which are stored in multiple locations. 
  For example: </p>
  
  <pre><code>./A/1.xml
  ./A/2.xml
  ./A/3.xml
  ./B/4.xml
  ./B/5.xml
  ./B/6.xml
  </code></pre>
  
  <p>How can I load all of these files so that I can extract three particular elements in each file such as id, name and hypothesis?</p>
  
  <p>I need help in the loading aspect of the question. FYI the path used above works if I do the following for each file:</p>
  
  <pre><code>from lxml import etree
  ltree = etree.parse("./100/A/1.xml")
  </code></pre>
  
  <p>I would prefer a solution using BeautifulSoup however lxml or ElementTree is fine too.</p>
  
  <p>The structure of the XML document is: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;pub-ref&gt;
  &lt;doc-id&gt;
  &lt;country&gt;US&lt;/country&gt;
  &lt;doc-num&gt;05040672&lt;/doc-num&gt;
  &lt;date&gt;20090219&lt;/date&gt;
  &lt;/doc-id&gt;
  &lt;/pub-ref&gt;
  &lt;app-ref&gt;
  &lt;doc-id&gt;
  &lt;country&gt;US&lt;/country&gt;
  &lt;doc-num&gt;111324&lt;/doc-num&gt;
  &lt;date&gt;20100919&lt;/date&gt;
  &lt;/doc-id&gt;
  &lt;/app-ref&gt; 
  </code></pre>