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
What are the two types of xml parsers?
What are the hooks provided by xslt?
What is dtd example?
How xslt works with xml?
What is the terms Test Object Model, Test Object and Run-Time object?
Why would you use xml?
Why do we use dtd?
Why is dtd important?
Is docx a zip file?
What is rss feed url?
How does xml store and transport data?
What is the difference between wsdl and xsd?
What are xml technologies?
How do I save a xml file?
How do I map data from excel to xml?