161

How would one get the value of attribute1 (blah) in the following xml using xslt:

<name attribute1="blah" attribute2="blahblah">
</name>
Smern
  • 18,066
  • 21
  • 67
  • 87

1 Answers1

295

This is more of an xpath question, but like this, assuming the context is the parent element:

<xsl:value-of select="name/@attribute1" />
James Sulak
  • 29,817
  • 11
  • 50
  • 56