Open and read sequential XML files with unknown files names in Python
<p>I wish to read incoming XML files that have no specific name (e.g. date/time naming) to extract values and perform particular tasks.
I can step through the files but am having trouble opening them and reading them.</p>

<p>What I have that works is:-</p>

<pre><code> import os
 path = 'directory/'
 listing = os.listdir(path)
 for infile in listing:
      print infile
</code></pre>

<p>But when I add the following to try and read the files it errors saying No such file or directory.</p>

<pre><code>      file = open(infile,'r')
</code></pre>

<p>Thank you.</p>
