title: I want to convert a xml files into text file using python
body: <p>I have a xml file as </p>
  
  <pre><code>&lt;annotation&gt;
      &lt;folder&gt;all_images&lt;/folder&gt;
      &lt;filename&gt;0.jpg&lt;/filename&gt;
      &lt;path&gt;/home/vishnu/Documents/all_images/0.jpg&lt;/path&gt;
      &lt;source&gt;
          &lt;database&gt;Unknown&lt;/database&gt;
      &lt;/source&gt;
      &lt;size&gt;
          &lt;width&gt;4250&lt;/width&gt;
          &lt;height&gt;5500&lt;/height&gt;
          &lt;depth&gt;1&lt;/depth&gt;
      &lt;/size&gt;
      &lt;segmented&gt;0&lt;/segmented&gt;
      &lt;object&gt;
          &lt;name&gt;word&lt;/name&gt;
          &lt;pose&gt;Unspecified&lt;/pose&gt;
          &lt;truncated&gt;0&lt;/truncated&gt;
          &lt;difficult&gt;0&lt;/difficult&gt;
          &lt;bndbox&gt;
              &lt;xmin&gt;308&lt;/xmin&gt;
              &lt;ymin&gt;45&lt;/ymin&gt;
              &lt;xmax&gt;502&lt;/xmax&gt;
              &lt;ymax&gt;162&lt;/ymax&gt;
          &lt;/bndbox&gt;
      &lt;/object&gt;
  </code></pre>
  
  <p>I want to convert this xml file into text file using python where the text file contains the dimensions (value) of xmin,ymin,xmax,ymax..For example
   I want to get the text file as </p>
  
  <p>308,45,502,45,502,162,308,162,word</p>
  
  <pre><code>663,52,823,52,823,173,663,173,word
  
  521,44,621,44,621,158,521,158,word 
  </code></pre>
  
  <p>this.
  ..I have a number of such xml files ,want to convert it all into text files..Also want to loop it for number of such files.  </p>