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

Why xml parsing is important?

0 Answers  


Describe the differences between XML and HTML.

2 Answers  


How is xml structured?

0 Answers  


What is the function of qualified names?

0 Answers  


Explain how to remove a particular attribute from XML?

0 Answers  






Can we use xslt to covert html into vxml?

3 Answers   CDAC,


What importance does xslt hold in xml?

0 Answers  


What is xml format in excel?

0 Answers  


What is axml file?

0 Answers  


What is xsl fo documents? Explain xsl-fo documents structure?

0 Answers  


What are the two types of xml parsers?

0 Answers  


What software is needed to process xml namespaces?

0 Answers  


Categories