I am creating an application for iOS which needs to create an XML document. I do this via KissXML. Part of the XML looks like
<ISIN><![CDATA[12345678]]></ISIN>
I cannot find any option in KissXML to create the CDATA part. Simply adding a string with the CDATA stuff as text will result in escaping the special characters like < and >. Can anyone give me a hint in how to write CDATA with KissXML?
Even though the solution by @moq is ugly, it works. I have cleaned up the string creation code and added it into a category.
DDXMLNode+CDATA.h:
DDXMLNode+CDATA.m:
The code is also available in this gist.