How to replace special characters ampersand in XSLT?

  • Thread starter Thread starter Gowtham Rajamanickam
  • Start date Start date
G

Gowtham Rajamanickam

Guest
I want to replace single quote and ampersand in XSLT of my workday Input XML file.I have a xml input like this below.

<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<cd>
<title>Gowtham &amp; Rajamanickam</title>
<artist>Test></artist>
<country>USA<</country>
<company>Columbia'</company>
<price>10.90</price>
<year>1985</year>
</cd>
</catalog>

I have tried using this below code and I am getting Empty output.


<xsl:value-of select="translate(title, &quot;&amp;'&quot;, '')"/>

My request is how to replace &amp; with new character in my xml file using XSLT.

Continue reading...
 
Back
Top