title: displaying Simple XML php
body: <p>I am looking for something equivalent to this:</p>
  
  <pre><code>$e= xmlwriter_open_uri("test.xml");
  ....
  print htmlentities(xmlwriter_output_memory($e));
  </code></pre>
  
  <p>now this print allows to display whats in the xml list into a table.</p>
  
  <p>But my with my simple xml (combined with $dom for formatting) i have no idea how to display this. Although this generates the proper output i wish into the xml how do i display the xml below? Something similar to a print or?</p>
  
  <p>The purpose is to display the values of the xml into a table.</p>
  
  <pre><code>$dom = new DOMDocument('1.0');
  $dom-&gt;preserveWhiteSpace = false;
  $dom-&gt;formatOutput = true;
  
  $xml = new SimpleXMLElement('&lt;test&gt;&lt;/test&gt;');       
      $one= $xml-&gt;addChild('enemy', 'yes');           
      $two= $xml-&gt;addChild('friend', 'maybe');           
  
  $dom-&gt;loadXML($xml-&gt;asXML());
  $dom-&gt;save('test.xml');
  </code></pre>
  
  <p>Regards</p>