Ani

Ani

  • 169
  • 11.2k
  • 34.9k

Unique value from a list in xslt

May 4 2017 5:07 AM
From below xml I want to pick only distinct values using xslt
 
Example data:
 
<student1>
<skills>
<skill>ASP</skill>
<skill>SQL</skill> 
<skill>ASP</skill> 
<skill>ASP.net</skill> 
<skill>WCF</skill> 
<skill>ASP</skill>  
</skills> 
</student1> 
 
<student2>
<skills>
<skill>Java</skill>
<skill>Sql</skill>
<skill>jQuery</skill>
<skill>HTML</skill>
<skill>Java</skill>
</skills>
</student2>
 
 
Expected result
 
 
<student1>
<skills>
<skill>ASP</skill>
<skill>SQL</skill>
<skill>ASP.net</skill>
<skill>WCF</skill>
</skills>
</student1>
 
<student2>
<skills>
<skill>Java</skill>
<skill>Sql</skill>
<skill>jQuery</skill>
<skill>HTML</skill>
</skills>
</student2>
 
Please help me on this 

Answers (1)