Python Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

Python Examples

Quick Start
Unicode
Byte Array
Bz2
Certificates
CSV
Email
Encryption
FTP
HTML Conversion
HTTP
IMAP
MHT
MIME
POP3
RSA
S/MIME
Signatures
Socket / SSL
SFTP
SMTP
Spider
SSH Key
SSH
SSH Tunnel
Tar
HTTP Upload
XML
XMP
Zip

More Examples...
String
Amazon S3
Email Object
DKIM / DomainKey
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

 

How to use GetParent and GetParent2

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

 Chilkat Python Module Downloads for Windows, Linux, and MAC OS X

import chilkat


xml0 = chilkat.CkXml()

#  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.

bookNode = xml.GetChild(0)

#  Set titleNode equal to the title child of bookNode:

titleNode = bookNode.GetChildWithTag("title")

#  Call GetParent to return a new object pointing to the parent node:

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:

str1 = bookNode.getXml()
str2 = bookNode2.getXml()
str3 = titleNode.getXml()

print str1
print str2
print str3

 

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