ARTICLES & TUTORIALS FOR XML DEVELOPMENT: XML Tutorials on CDATA blocks and CDATA sections generated by DATASETS
XML CDATA - All text in an XML document will be parsed by the parser. Only text inside a CDATA section will be ignored by the parser.
CDATA Sections - CDATA Sections are used to escape blocks of text containing characters which would otherwise be recognized as markup. All tags and entity references are ignored by an XML processor that treats them just like any character data. CDATA blocks have been provided as a convenience measure when you want to include large blocks of special characters as character data, but you do not want to have to use entity references all the time. For example writing a tutorial about XML would contain...
Introduction to XML For Web Developers - As we have already said, it is a pretty good rule of thumb to consider anything outside of tags to be character data and anything inside of tags to be considered markup. But alas, in one case this is not true. In the special case of CDATA blocks, all tags and entity references are ignored by an XML processor that treats them just like any old character data...
Commenting and CDATA - This article will teach you about commenting and learning how to write text which you want to go unparsed in XML.
XML CDATA - XML parsers normally parse all the text in an XML document. When an XML element is parsed; the text between the XML tags is also parsed.The parser ignores only text inside a CDATA section.
Inserting CDATA Sections into XML Generated by DataSets - 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 <). 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.