title: Display images from xml file to php
body: <p>I am new in PHP and XML.</p>
  
  <p>I'm trying to make an e-shop where I have XML files as "database". In fact one XML for each product.</p>
  
  <p>I display the data with PHP and everything seems to be going well except the images. When I'm trying to display the images in the <code>image td</code> it shows the path of the image and not the image.</p>
  
  <p>PHP code        </p>
  
  <pre><code>&lt;?php
      $files =glob('*.xml');
      foreach($files as $file){
          $xml=new SimpleXMLElement($file, 0, true);
          $xpath = $xml-&gt;xpath("/wine/image");
  ?&gt;                              
  &lt;tr&gt;
      &lt;td&gt;&lt;?php echo $xml-&gt;id ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $xml-&gt;category ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $xml-&gt;name ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $xml-&gt;producer ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $xml-&gt;price ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $xpath[0]['src']; ?&gt;&lt;/td&gt;                            
  &lt;/tr&gt;  
  &lt;?php
      }
  ?&gt;
  </code></pre>
  
  <p>data.xml</p>
  
  <pre><code>&lt;wine&gt;
      &lt;category&gt;red&lt;/category&gt;
      &lt;id&gt;1&lt;/id&gt;
      &lt;name&gt;krasaki&lt;/name&gt;
      &lt;producer&gt;alkoolikos&lt;/producer&gt;
      &lt;price&gt;12.50&lt;/price&gt;
      &lt;addcart&gt;patato&lt;/addcart&gt;
      &lt;image   src="images/white_wine.jpg" width="50" height="50"  /&gt; 
  &lt;/wine&gt;
  </code></pre>
  
  <p>And <code>wine</code> is the root tag of the XML</p>