Hi iam write this code
\"
XmlTextReader read = new XmlTextReader(\"http://msdn.microsoft.com/rss.xml\");
DataSet ds = new DataSet();
I think this error will display when you are trying to ReadXml from Responsetext from service calls. In this Case Just Fetch the necessary node attribute which you require in outerxml format . Those who are not neccessary skip that element.
E.g
var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
XmlDocument doc = new XmlDocument();
DataSet ds = new DataSet();
doc.LoadXml(responseString);
foreach (XmlNode node in doc.SelectNodes("result/records"))
{
doc = new XmlDocument();
doc.LoadXml(node.OuterXml.ToString());
}
using (XmlReader reader = new XmlNodeReader(doc.DocumentElement))
{
ds.ReadXml(reader);
reader.Close();
}
In Above example I want only 'records' node in response stream . So that I am fetching only that & given to dataset for processing.
I hope it helps!!!!!!!!!!!!!!!!!!!!!!!!!!!