Php xml & xls


I’m building out an application in PHP using XSL to transform XML output from a database.

I’m trying to grab some data from the XML

<figure name="height" value="6"/>
<figure name="weight" value="6"/>

I am trying to get the value of the “value” attribute of the figure element with “name” value of weight. This is what I have tried but to now avail.

<xsl:value-of select="figure[@name='weight']::@value"/>

& other combinations. Not entirely random, but I cannot figure it out. Anyone have an idea?

How is this a PHP question? Your relevant code doesn’t use PHP at all.