Programming Examples

ChilkatHOMEASPVisual BasicVB.NETC#CC++MFCDelphiFoxProJavaPerlPythonRubySQL ServerVBScript

PHP ActiveX Examples

Bounced Mail
Bz2
Certificates/Keys
Charset
CSV
DKIM / DomainKey
Diffie-Hellman
DSA
Email Object
Encryption
FileAccess
FTP
HTML Conversion
HTTP
IMAP
MHT / HTML Email
MIME
NTLM
POP3
RSA
SMTP
Socket
Spider
SSH Key
SSH
SSH Tunnel
SFTP
Tar
Upload
XML
Zip
Amazon S3


 

 

 

 

 

 

 

 

Navigate to Content in XML

Demonstrates how to retrieve "Bears" from the following XML:

<?xml version="1.0" encoding="utf-8" ?>

<sports>
    <baseball>
        <mlb>
            <chicago>Cubs</chicago>
            <new_york>Yankees</new_york>
        </mlb>
    </baseball>
    <football>
        <chicago>Bears</chicago>
        <new_york>Jets</new_york>
    </football>
    <basketball>
        <chicago>Bulls</chicago>
        <new_york>Knicks</new_york>
    </basketball>
</sports>

Download Chilkat XML ActiveX

<?php


$xml = new COM("Chilkat.Xml");

//  Assume the XML is contained in the file: sports.xml

$success = $xml->LoadXmlFile('sports.xml');
if ($success != true) {
    print $xml->lastErrorText() . "\n";
    exit;
}

// xml2 is a Chilkat.Xml
$xml2 = $xml->GetChildWithTag('football');

// xml3 is a Chilkat.Xml
$xml3 = $xml2->GetChildWithTag('chicago');

print $xml3->content() . "\n";


?>

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

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