How do I go from this (using PHP preferably):
<bookstore>
<book category="cooking">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="web" cover="paperback">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
To this (please imagine this to be an actual HTML table, I am not allowed to post images yet):
|bookstore|book| title | author |year|price|
| | |Everyday Italian|Giada De Laurentiis|2005|30.00|
| | |Learning XML |Erik T. Ray |2003|39.95|
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.