Hi ,I solved the above issue..It was because of the above code snippet when forming dataset to xml adding an special character.I rewritten the code without considering encoding.It worked fine.
string result;
> using (StringWriter sw = new StringWriter()) {
> ds.WriteXml(sw);
> result = sw.ToString();
> }