If you don't need to manipulate the data and just need to present it you can make an XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<table>
<tr>
<th>Bookstore</th>
<th>Book</th>
<th>title</th>
<th>author</th>
<th>year</th>
<th>price</th>
</tr>
<xsl:for-each select="bookstore/book">
<tr>
<td></td>
<td></td>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="author"/></td>
<td><xsl:value-of select="year"/></td>
<td><xsl:value-of select="price"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
You can use php XSLT processor to generate the html or just link to the XSLT directly in the xml. For example if you link it like so:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="bookstore.xsl"?>
<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>
This is what would be rendered in the web browser:
<html>
<body>
<table>
<tbody>
<tr>
<th>Bookstore</th>
<th>Book</th>
<th>title</th>
<th>author</th>
<th>year</th>
<th>price</th>
</tr>
<tr>
<td></td>
<td></td>
<td>Everyday Italian</td>
<td>Giada De Laurentiis</td>
<td>2005</td>
<td>30.00</td>
</tr>
<tr>
<td></td>
<td></td>
<td>Learning XML</td>
<td>Erik T. Ray</td>
<td>2003</td>
<td>39.95</td>
</tr>
</tbody>
</table>
</body>
</html>