I have an xml that contains some special characters like & and whitespaces.
I want to handle these special characters in xsl.
How can I handle special characters in xsl?
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="cpdhtml.xsl"?>
<pmd-cpd>
<duplication lines="72" tokens="75">
<file line="632" path="M:\PBA0039 & Code\Common\ssc\src\Main.c"/>
<file line="1802" path="M:\PBA0039 & Code\Common\ssc\src\link1.c"/>
</duplication>
</pmd-cpd>
Here you can see & in path. It gives error while transforming xml.
Please help me to fix this problem.
You need to escape them, as you do in any XML document.
The escape for
&is&.