public override void WriteCData( string text ) {
if ( text != null ) {
if ( checkValues ) {
CheckCharacters( text );
}
if ( replaceNewLines ) {
text = ReplaceNewLines( text );
}
int i;
while ( ( i = text.IndexOf( "]]>", StringComparison.Ordinal ) ) >= 0 ) {
writer.WriteCData( text.Substring( 0, i + 2 ) );
text = text.Substring( i + 2 );
}
}
writer.WriteCData( text );
}