How to encode special characters in xml? e.g: i have a special character mu in my xml, transformation will fail due to this character any info would be helpful
Thanks Preetham
How to encode special characters in xml? e.g: i have a special character mu in my xml, transformation will fail due to this character any info would be helpful
Thanks Preetham
you can encode your xml in utf-8 and use
<node><![CDATA[ odd characters here ]]></node>
Any valid UTF-8 character should be fine in XML, and any XML processing tool (including XSLT) should handle them also. If the file is valid XML, then it should work. Can you post an example XML file that is giving you trouble?
XML text defaults to the UTF-8 encoding. This supports all characters you care to throw at it. Only by deliberately selecting a non-international encoding would it fail to encode correctly.
If you are building up your XML via string concatenation then you need to stop doing that and start using a library (e.g. DOM) in your language to create the XML.
The library will handle encoding correctly.