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



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

Answer / guest

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.

<xsl:template match="element-name">

Attribute Value:

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

<xsl:apply-templates/>

</xsl:template>

Is This Answer Correct ?    11 Yes 6 No

Post New Answer

More XML XSLT RSS Interview Questions

What is meant by wsdl?

0 Answers  


How do I convert an xml file to powerpoint?

0 Answers  


How to transform an XML document into another XML document?

0 Answers  


what is the difference between xpath document and xml document?

3 Answers   Honeywell,


What is the advantage of automated testing over manual testing?

0 Answers  


What happens about the presence of the top-level element?

0 Answers  


Does anyone use xslt anymore?

0 Answers  


How do you display xml with xslt?

0 Answers  


Can the content model in an element type declaration contain element types whose names come from other xml namespaces?

0 Answers  


Does chrome have an rss reader?

0 Answers  


What does svg stand for and what is it used for?

0 Answers  


What is xml document?

0 Answers  


Categories