top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

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

0 votes
765 views
Using XSLT, how would you extract a specific attribute from an element in an XML document?
posted Jan 3, 2018 by Jayshree

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Successful candidates should recognize this as one of the most basic applications of XSLT. If they are not able to construct a reply similar to the example below, they should at least be able to identify the components necessary for this operation: 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.

Extract Attributes from XML Data
Example 1.

Attribute Value:

    <xsl:value-of select="@attribute"/>

    <xsl:apply-templates/>

answer Jan 3, 2018 by Shivaranjini
...