Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Who can create an xml namespace?

926


What is an xslt template?

986


Why has xml been used for development?

893


Where is pom xml?

902


What is xmlns xs?

921


How do I open an xml file in internet explorer?

946


what is Identity template in XSL, why do you use it?

991


Where is office xml handler located?

987


What is XML Remmittance information?

984


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

926


What is the difference between xsl and xslt?

1010


I’m trying to understand the xml spec: why does it have such difficult terminology?

904


What are the standard ways of parsing xml document? Or what is a xml parser?

893


What is the usage of xslt?

1039


How do I convert html to xml?

1006