XmlWriter.CData
Overview
Writes the specified value to the current element as CDATA.
XmlWriter myXmlWriter.CData(value: string)
Writes the specified value to the current element as CDATA.
XmlWriter myXmlWriter.CData(elementName: string, value: string)
Arguments
string value
value to write
string elementName
name of element
Remarks
This method writes the specified value to the current element as CDATA and returns the current writer instance.
Example
var writer = $Xml.Create();
writer.StartElement('Customer');
writer.CData('Doe');
writer.EndElement();
var xml = writer.ToXml();
// xml: <Customer><![CDATA[Doe
Example
var writer = $Xml.Create();
writer.CData('Customer', 'Doe');
var xml = writer.ToXml();
// xml: <Customer><![CDATA[Doe
Copyright © 2010 - 2023 Emakin. All rights reserved.