Main menu:

 

January 2009
M T W T F S S
« Dec    
 1234
567891011
12131415161718
19202122232425
262728293031  

Site search

Archives

Categories

Tags

Links:

Tag: loop through the attributes in a node

How to get all the names of the attributes in a node

Hello everyone,
In my previous post , I had written how to get the count of no of attributes in a node, In the this I will shed light on how to check for a particular names of the attributes in a node.
<xsl:template match=”YourNodeName”>
<xsl:for-each select=”@*”>
<xsl:choose>
<xsl:when test=”name() =’AnyAttributeName’”><xsl:value-of select=”//./location/@AnyAttributeName” /></xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>