![]() |
XSLT <key> Element is used to declare the key which is later used to identify the node with the help of the key function. The <xsl: key> tag assigns a specific key to an XML element And the key() function used to access this element of XML Syntax: <xsl:key
name = "name"
match = "pattern"
use = "expression" />
Parameters:
Example 1: In this example, we will make a key to a branch and use it to select the node with specified key-value pairs. Save Both files as mentioned and open xsl file on the Browser, it will show the output as shown below: XML
XML
Output: ![]() key element Example 2: In this example, we will make a key to a name and use it to select all node with name Dhananjay. Save Both files as mentioned and open xsl file on the Browser, it will show the output as shown below: XML
XML
Output: ![]() key element |
Reffered: https://www.geeksforgeeks.org
Data Formats |
Related |
---|
![]() |
![]() |
![]() |
|
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |