You probably have experience while parsing openstreetmap .osm file - some name [TAG-NAME] appear as
C&C - which is in clear text "C&C". So while you are coding for a .osm or XML parser, it is important to consider such special character at XML specification.
If it need to present such value at literal form, it is important to replace those characters with some other clear text format.
For example, if it need to replace the above "&" a below C program can make an idea.
char *special_ch_replace
(char *s, char ser, char rep)
{
char *p1;
for (p1=s; *p1; p1++)
{
if (*p1 == ser)
{
*p1 = rep;
}
}
return s;
}