Home > DeveloperSection > Interviews > Using XSLT, how would you extract a specific attribute from an element in an XML document?

Posted on    March-18-2011 12:00 AM

 1 Answer(s)
  1637  View(s)
Rate this:

Dependra Pathak
Dependra Pathak

Total Post:77

Posted on    March-18-2011 12:00 AM

Extract Attributes from XML Data
<xsl:template match=”element-name”>
Attribute Value:
<xsl:value-of select=”@attribute”/>


 Note: xsl:template to match the appropriate XML element,
xsl:value-of to select the attribute value, and the optional
xsl:apply-templates to continue processing the document.

Don't want to miss updates? Please click the below button!

Follow MindStick