Ihave an issue with reading an XML string into XMLTextReader..
I'm querying the a DB and getting a DataSet back. From that DataSet, I'm reading a specific row and column (which contains XML strings) and using that XML string value to pass to an XMLTextReader. The problem is that I'm getting the error "Illegal Character in path".
I know that the XML string returned from the DB is proper, as I can open the XML in my browser.
This is the code I'm using:
string XMLstring = DS.Tables[0].Rows[i][y].ToString();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(XMLstring);
StringWriter sw = new StringWriter();
XmlTextWriter xw = new XmlTextWriter(sw);
xmlDoc.WriteTo(xw);
XmlTextReader textReader = new XmlTextReader(sw.ToString());
Any ideas why I'm getting this error??
Thanks!