I'm creating an application that reads Xml from an RSS feed. The problem is that sometimes, some of the data contains special characters such as '&' . For instance:
<row id="AOVP">
<column id="code">AOVP</column>
<column id="sname">AF & OVR 6% PART PRF</column>
<column id="time">18:30:45</column>
<column id="trade">14498</column>
<column id="points">62</column>
<column id="perc">0.43</column>
</row>
I have to reformat this xml so that it looks like this:
<Share>
<Code>AOVP</Code>
<ShortName>AF & OVR 6% PART PRF</ShortName>
<Time>18:30:45</Time>
<Trade>14498</Trade>
<Points>62</Points>
<Perc>0.43</Perc>
</Share>
I have no control over the data I receive, so I can't "clean it". And these special characters make my application crash when I try to reformat the xml for my own purposes. How can I read these values without encountering an XmlException?
PS: I've gone through numerous answers on StackOverflow and other forums, and nothings seems to work.