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

VBScript Examples

Web API Categories

ASN.1
Amazon Glacier
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
FileAccess
Firebase
GMail REST API
Geolocation
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
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)
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
REST
REST Misc
RSA Encryption
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Socket/SSL/TLS
Spider
Stream
Tar Archive
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl

 

 

 

(VBScript) Demonstrate the XML NewChildInt2 Method

Demonstrates the XML NewChildInt2 method.

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

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)

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

set xml = CreateObject("Chilkat_9_5_0.Xml")

xml.Tag = "animal"

i = 0
Do While 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.
    xml.NewChildInt2 "bird|flightless|penguin|number",i
    i = i + 1
Loop

outFile.WriteLine(xml.GetXml())

'  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>
' 

outFile.Close

 

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