Converting a C# DataTable instance to xml that contains HTML or binary data
Posted
by Wardy
on Stack Overflow
See other posts from Stack Overflow
or by Wardy
Published on 2010-05-17T10:23:48Z
Indexed on
2010/05/17
10:30 UTC
Read the original article
Hit count: 262
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?
© Stack Overflow or respective owner