title: parse multiple xml file using python
body: <p>I have multiple xml files in a folder. I want to parse all the xml files.I have tried minidom parsing but I could not do it. Here is the xml files are like- </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;?xml-stylesheet type="text/xsl" href="frame.xsl"?&gt;
  &lt;frame cBy="KmG" cDate="03/05/2008 03:50:35 PST Wed" name="Abandonment" ID="2031" xsi:schemaLocation="../schema/frame.xsd" xmlns="http://framenet.icsi.berkeley.edu" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;definition&gt;&amp;lt;def-root&amp;gt;An &amp;lt;fex name="Agent"&amp;gt;Agent&amp;lt;/fex&amp;gt; leaves behind a &amp;lt;fex name="Theme"&amp;gt;Theme&amp;lt;/fex&amp;gt; effectively rendering it no longer within their control or of the normal security as one's property. 
  
  &amp;lt;ex&amp;gt;&amp;lt;fex name="Agent"&amp;gt;Carolyn&amp;lt;/fex&amp;gt; &amp;lt;t&amp;gt;abandoned&amp;lt;/t&amp;gt; &amp;lt;fex name="Theme"&amp;gt;her car&amp;lt;/fex&amp;gt; and jumped on a red double decker bus.&amp;lt;/ex&amp;gt;
  
  &amp;lt;ex&amp;gt;Perhaps &amp;lt;fex name="Agent"&amp;gt;he&amp;lt;/fex&amp;gt; &amp;lt;t&amp;gt;left&amp;lt;/t&amp;gt; &amp;lt;fex name="Theme"&amp;gt;the key&amp;lt;/fex&amp;gt; in the ignition&amp;lt;/ex&amp;gt;
  
  &amp;lt;ex&amp;gt;&amp;lt;t&amp;gt;Abandonment&amp;lt;/t&amp;gt; &amp;lt;fex name="Theme"&amp;gt;of a child&amp;lt;/fex&amp;gt; is considered to be a serious crime in many jurisdictions.&amp;lt;/ex&amp;gt; 
  &lt;/frame&gt;
  </code></pre>
  
  <p>I have tried this below code - where i want to take only the line between ex.</p>
  
  <pre><code>from helperDef import *
  import os
  from xml.dom import minidom
  
  for root, dirs, files in os.walk('frame'):
      for file in files:
          if (file.endswith('.xml')):
               xmldoc = minidom.parse(os.path.join(root, file))
               if '&lt;ex&gt;' in xmldoc:
                  line = find_between(xmldoc, '&lt;ex&gt;', '&lt;/ex&gt;')
                  print(line)
                  clean_line = cleanText(line)
                  print(clean_line)
  </code></pre>
  
  <p>The error is  - </p>
  
  <blockquote>
    <p>TypeError: argument of type 'Document' is not iterable</p>
  </blockquote>
  
  <p>Any way to do this?Help!</p>