Javatpoint Logo
Javatpoint Logo

XSLT <xsl:for-each> Element

The XSLT <xsl:for-each> element is used to apply a template repeatedly for each node.


Parameter explanation

Select: XPath Expression to be evaluated in current context to determine the set of nodes to be iterated.


XSLT Element Example

Let's take an example to creates a table of <employee> element with its attribute "id" and its child <firstname>,<lastname><nickname> and <salary> by iterating over each employee.

Employee.xml

Employee.xsl

Output:

XSLT Xsl for each element 1
Next TopicXSLT <sort>





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA