Using XSLT, how would you extract a specific attribute from
an element in an XML document?
Answer Posted / 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 View All Answers
Is xml meant to replace html?
Why is my rss feed not working?
What are various hooks given by xslt?
Explain the relationships of XSLT with XSL?
What is xsl text?
How do I edit an xsl file?
What is xml why is it used?
What is dtd ( document type definition )?
What is dom? What is it used for?
How xml is used in web application?
How do I open a xsl file?
What is xml and its uses?
When should I use a cdata marked section?
Explain about the techniques for processing xml files?
What is xml file in asp net?