Reputation: 2379
So I probably didn't word the title well. But, what I want to do is given the following xml excerpt:
<id name="tim" number="5555665" />
I would like to pull out the actual name and number of id. I have tried:
<xsl:value-of select="id.name"/>
AND
<xsl:value-of select="id/name"/>
Neither of which have done the trick. How can I access these data values?
Upvotes: 0
Views: 775
Reputation: 1825
<xsl:value-of select="id/@name"/>
<xsl:value-of select="id/@number"/>
Upvotes: 1
Reputation: 6397
To select attribute values with XPath, use the @
selector:
<xsl:value-of select="id/@name" />
<xsl:value-of select="id/@number" />
Upvotes: 3