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

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

 

 

How to use GetParent and GetParent2

How to use GetParent and GetParent2. This is a snippet of the document used in this example:

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

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

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

#include <CkXml.h>
#include <CkString.h>

void ChilkatSample(void)
    {

    CkXml xml0;
    CkXml *xml = 0;

    //  The Chilkat XML component is freeware.

    //  Load an XML document.  Typically you might call LoadXml
    //  to load an XML file.  This example loads an XML file from
    //  a URL:
    xml = xml0.HttpGet("http://www.chilkatsoft.com/testData/bookstore.xml");

    //  The xml object points to the root node of the XML document.

    //  Set bookNode equal to the 1st child of the root.
    CkXml *bookNode = 0;
    bookNode = xml->GetChild(0);

    //  Set titleNode equal to the title child of bookNode:
    CkXml *titleNode = 0;
    titleNode = bookNode->GetChildWithTag("title");

    //  Call GetParent to return a new object pointing to the parent node:
    CkXml *bookNode2 = 0;
    bookNode2 = titleNode->GetParent();

    //  bookNode2 and bookNode point to the same node.

    //  Call GetParent2 (which returns nothing) to modify the internal
    //  pointer within the calling object so that it points to the immediate parent:
    titleNode->GetParent2();

    //  Now titleNode points to the same node as bookNode2 and bookNode.
    //  To prove it, generate the XML sub-tree rooted at the calling
    //  node and display each:
    CkString str1;
    CkString str2;
    CkString str3;
    str1 = bookNode->getXml();
    str2 = bookNode2->getXml();
    str3 = titleNode->getXml();

    printf("%s\n",(const char *)str1);
    printf("%s\n",(const char *)str2);
    printf("%s\n",(const char *)str3);

    }

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