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>
Posted: November 11th, 2008 under xml, xml attributes.
Tags: loop through the attributes in a node
Comments: none