Hmmmm …
Although it works in most cases, one column has html data in it.
It seems that doing this …
StringBuilder xmltarget = new StringBuilder();
XmlWriter xmlWriter = XmlWriter.Create(xmltarget);
tableData.WriteXml(xmlWriter);
… doesn’t identify where this html or binary data exists and wrap the data in cdata tags as it should …
Is there something i need to do to ensure the relevant checks are made and a working xml string is produced?
The datatable, I assume that the column with the html in it is just a string? If so then you’re going to have to wrap it with the CData tags yourself. I don’t think there is any magic in .Net that will do this for you.
I’d be happy to be proven wrong.