c# xml string special characters An error occurred while parsing EntityName. Line 1,

Gjzgiumy

New Member
Please help explain why the dataset cannot read the encoded xml?\[code\] string xml = "<?xml version=\"1.0\" standalone=\"yes\" ?> <DataSet><node>it's my \"node\" & i like it</node></DataSet>"; string encodedXml = System.Security.SecurityElement.Escape(xml); DataSet ds = new DataSet(); ds.ReadXml(New XmlTextReader(new StringReader(encodedXml)));\[/code\]I have checked the link http://weblogs.sqlteam.com/mladenp/...nt-ways-how-to-escape-an-XML-string-in-C.aspxWhat i want to do is to read a string with special characters into a dataset. Anyone could provide the code to read a string with special characters into a dataset.thanks very much
 
Back
Top