Thursday, May 25, 2017
 
Code Search
 
Code Bank
 
.NET Applications
XSD Schema Generator
 
.NET/XML Training




 







Inserting CDATA Sections into XML Generated by DataSets
Description

In version 1.0 of .NET, DataSets do not provide an internal MappingType that allows element data to be wrapped with a CDATA section when XML is generated. This can present a problem when data pulled from the database contains reserved XML characters such as < since the DataSet GetXml() and WriteXml() methods escape these characters (< becomes &lt;). This demo shows how DataSet elements can be mapped to CDATA sections using a custom class named CDATAGenerator. Doing so helps to preserve data "as is" rather than converting some of it into entities.


Teaches XmlValidatingReader, DataSet, XmlTextWriter
Requirements .NET 1.0
Example: Click Here
View Source Code: Click Here
Download Code: Click Here

 


.NET, SharePoint and Silverlight Training Solutions
    Online, Onsite and Video Training on .NET and SharePoint technologies available through The Wahlin Group.



© 2007 Wahlin Consulting LLC
XML for ASP.NET Developers in bookstores
Get XML for ASP.NET
Developers