Visual C++ Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Delphi ActiveXDelphi DLLVisual FoxProJavaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerShellPythonRubySQL ServerUnicode CUnicode C++Visual Basic 6.0VB.NETVBScript

C++ Examples

CkString
Byte Array
Bounced Mail
Bz2
Character Encoding
CSV
DH Key Exchange
DKIM/DomainKeys
Digital Certificates
Digital Signatures
DSA
Email
Email Object
Encryption
FTP
HTML Conversion
HTTP
IMAP
MHT / HTML Email
POP3
RSA
S/MIME
SMTP
Socket
Spider
SSH Key
SSH
SSH Tunnel
SFTP
Tar
Upload
XML
XMP
Zip Compression


More Examples...
Amazon S3
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

 

 

 

 

 

 

 

 

(C++) Using CDATA in XML

Demonstrates how to force the content of a node to be encapsulated in CDATA.

The output of the following program is an XML document that looks like this:


<root>
    <year>2009</year>
    <junk1>abc .. &lt; &amp; &gt; 123</junk1>
    <junk2><![CDATA[abc .. < & > 123]]></junk2>
</root>

Downloads:

MS Windows Visual C/C++ Libraries
Linux/CentOS C/C++ Libraries
MAC OS X C/C++ Libraries
Solaris C/C++ Libraries
C++ Builder Libraries
FreeBSD C++ Libraries
HP-UX C++ Libraries
BlackBerry QNX C++ Libraries
#include <CkXml.h>

void ChilkatSample(void)
    {
    CkXml xml;

    CkXml *child1 = 0;
    CkXml *child2 = 0;
    CkXml *child3 = 0;

    xml.put_Tag("root");

    child1 = xml.NewChild("year","2009");

    child2 = xml.NewChild("junk1","abc .. < & > 123");

    child3 = xml.NewChild("junk2","abc .. < & > 123");
    child3->put_Cdata(true);

    delete child1;
    delete child2;
    delete child3;

    printf("%s\n",xml.getXml());
    }

© 2000-2013 Chilkat Software, Inc. All Rights Reserved.