title: How to convert XML to HTML table?
body: <p>How do I go from this (using PHP preferably):</p>
  
  <pre><code>&lt;bookstore&gt;
    &lt;book category="cooking"&gt;
      &lt;title lang="en"&gt;Everyday Italian&lt;/title&gt;
      &lt;author&gt;Giada De Laurentiis&lt;/author&gt;
      &lt;year&gt;2005&lt;/year&gt;
      &lt;price&gt;30.00&lt;/price&gt;
    &lt;/book&gt;
    &lt;book category="web" cover="paperback"&gt;
      &lt;title lang="en"&gt;Learning XML&lt;/title&gt;
      &lt;author&gt;Erik T. Ray&lt;/author&gt;
      &lt;year&gt;2003&lt;/year&gt;
      &lt;price&gt;39.95&lt;/price&gt;
    &lt;/book&gt;
  &lt;/bookstore&gt;
  </code></pre>
  
  <p>To this (please imagine this to be an actual HTML table, I am not allowed to post images yet):</p>
  
  <pre><code>|bookstore|book|    title       |     author        |year|price|
  |         |    |Everyday Italian|Giada De Laurentiis|2005|30.00|
  |         |    |Learning XML    |Erik T. Ray        |2003|39.95|
  </code></pre>
  
  <p>Please notice that all nodes are listed but only those values are written that have a value. This is like converting the XML into a complete a "flat" table, if you get what I mean.</p>