Nevermind... I finally got it. :p
I changed it to this:
<?php
$dir = 'templates/*';
foreach (glob($dir . "/template.xml") as $filename) {
echo "$filename size " . filesize($filename) . "<br />\n";
ini_set('zend.ze1_compatibility_mode', '0');
$xml = simplexml_load_file($filename);
print("<p>
<img src=\"$xml->thumb\" alt=\" $xml->tempname \" title=\" $xml->tempname \" /><br />
Name: $xml->tempname<br />
Created by: <a href=\"mailto:$xml->email\">$xml->creator</a>
</p>");
}
?>