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 the format of xml file?

0 Answers  


What happens if your atom feed fails the validation?

0 Answers  


What xpointer schemes are supported in this release?

0 Answers  


What is xml syntax?

0 Answers  


Describe the differences between XML and HTML.

2 Answers  






State and explain about xml encoding errors?

0 Answers  


what is the difference between xpath document and xml document?

3 Answers   Honeywell,


What is atom in rss?

0 Answers  


What is fo file format?

0 Answers  


Explain about dom interface?

0 Answers  


What are possible ways XML used in j2ee WebApplication.Like storing data in to database and for data transfer .Apart from this any uses.

0 Answers  


How do I convert html to xml?

0 Answers  


Categories