Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3/4TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

Tcl Examples

ASN.1
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Service Bus
Base64
Bounced Email
Box
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
ECC
Email Object
Encryption
FTP
Facebook
FileAccess
Firebase
GMail REST API
GeoOp
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Google Sheets
Gzip
HTML-to-XML/Text
HTTP
HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)

Java KeyStore (JKS)
Jira
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
PayPal
Peoplevox
QuickBooks
REST
REST Misc
RSA Encryption
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Shopify
Socket/SSL/TLS
Spider
Stream
Stripe
SugarCRM
Tar Archive
Twitter
Upload
VoiceBase
Walmart
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Xero
Zip
curl
eBay

 

 

 

(Tcl) Demonstrate the XML NewChildInt2 Method

Demonstrates the XML NewChildInt2 method.

Note: This example requires Chilkat v9.5.0.64 or later.

Chilkat Tcl Extension Downloads

Chilkat Tcl Extension Downloads

load ./chilkat.dll

#  Note: This example requires Chilkat v9.5.0.64 or later.

set xml [new_CkXml]

CkXml_put_Tag $xml "animal"

set i 0
while {[expr $i < 10]} {
    #  The first call (in the 1st loop iteration) automatically
    #  creates the children in the path.
    #  Each subsequent call finds the inner nodes in the path
    #  already exist, but always adds a new child at the leaf,
    #  even if it is a duplicate.
    [CkXml_NewChildInt2 $xml "bird|flightless|penguin|number" $i]
    set i [expr $i + 1]
}

puts [CkXml_getXml $xml]

#  Output:

#  	<?xml version="1.0" encoding="utf-8" ?>
#  	<animal>
#  	    <bird>
#  	        <flightless>
#  	            <penguin>
#  	                <number>0</number>
#  	                <number>1</number>
#  	                <number>2</number>
#  	                <number>3</number>
#  	                <number>4</number>
#  	                <number>5</number>
#  	                <number>6</number>
#  	                <number>7</number>
#  	                <number>8</number>
#  	                <number>9</number>
#  	            </penguin>
#  	        </flightless>
#  	    </bird>
#  	</animal>
# 

delete_CkXml $xml

 

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