Posts

Showing posts from January, 2017

Symbol causing error in XML data

Hello Everyone, As we know that some characters have special meaning in XML data like ampersand (&) is one of them. So, these characters should be substituted (ie use string replacement) with their respective entity references. As per XML specification, there are 5 predefined entities in XML: &lt;    <   less than &gt;    >   greater than &amp;   &   ampersand &apos;  '   apostrophe &quot;  "   quotation mark Now alternatively, we can place "text" strings which might contain special characters within a CDATA section so XML parsers will not attempt to parse them. Here is the solution : <SomeElement><![CDATA[This & will be ignored]]></SomeElement> Hope it will helps, Enjoy