Gaurav Gupta
Gaurav Gupta

Reputation: 29

I want to replace special characters in xml using xsl while converting it to csv

I have tried for commas ',' but want to do it for double quotes '"' also .

 <xsl:variable name="status_name" select="translate(status_name,  ',' , ' ')" />

I want to do it simultaneously .

If anyone can help me with this .

Thanks in advance .

Upvotes: 1

Views: 126

Answers (1)

Tim C
Tim C

Reputation: 70638

In the case of replacing single characters with other single characters, you can still use translate here, although for double-quotes you will need to escape it in the expression

<xsl:variable name="status_name" select="translate(status_name, ',&quot;', '  ')" />

In this case, the double quote is also being replaced by a space.

Upvotes: 1

Related Questions