Visual C++ Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Visual C++ Examples

CkString
Byte Array
Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
Encryption
FTP
HTML-to-XML
HTTP
IMAP
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
Tar
Upload
XML
XMP
Zip Compression


More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
SSH Key
SSH
SSH Tunnel
SFTP

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

 

 

Add Child Tree

Add a child tree to an existing XML document.

Download Chilkat C/C++ Libraries for VC++ 9.0 / Win32

Download Chilkat C/C++ Libraries for VC++ 8.0 / Win32

Download Chilkat C/C++ 64-bit Libraries for VC++ 8.0 / x64

Download Chilkat Visual Studio 2005 C/C++ Libs for Windows Mobile, Pocket PC, SmartPhone, WinCE

Download Chilkat C/C++ Libraries for VC++ 7.0 / Win32

Download Chilkat C/C++ Libraries for VC++ 6.0 / Win32

Download Chilkat C/C++ Libraries for VC++ 6.0, Win 95/98/NT4 Compatible

#include <CkXml.h>

void ChilkatSample(void)
    {

    //  First, build a sample XML document:
    CkXml xml;
    xml.put_Tag("stocks");

    CkXml *xmlM = 0;
    xmlM = xml.NewChild("Microsoft","");
    xmlM->NewChild2("symbol","MSFT");
    xmlM->NewChild2("recentPrice","28.00");

    CkXml *xmlG = 0;
    xmlG = xml.NewChild("Google","");
    xmlG->NewChild2("symbol","GOOG");
    xmlG->NewChild2("recentPrice","440.00");

    //  Display the XML so far...
    printf("%s\n",xml.getXml());

    //  This is the XML displayed:
    //  <stocks>
    //      <Microsoft>
    //          <symbol>MSFT</symbol>
    //          <recentPrice>28.00</recentPrice>
    //      </Microsoft>
    //      <Google>
    //          <symbol>GOOG</symbol>
    //          <recentPrice>440.00</recentPrice>
    //      </Google>
    //  </stocks>

    //  We want to add Yahoo to it:
    const char * xYahoo;
    xYahoo = "<Yahoo><symbol>YHOO</symbol><recentPrice>28.00</recentPrice></Yahoo>";

    CkXml xmlYahoo;
    xmlYahoo.LoadXml(xYahoo);

    //  Add the xmlYahoo document just under the root node of
    //  our original XML document:
    xml.AddChildTree(xmlYahoo);

    //  Display the result:
    printf("%s\n",xml.getXml());

    delete xmlM;
    delete xmlG;
    }

Need a specific example? Send a request to support@chilkatsoft.com

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

Mail Component · .NET Mail Component · XML Parser