VBScript Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VBScript Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
PFX
RSA Encryption
S/MIME
Socket
Spider
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Email Object
POP3
SMTP
Byte Array
RSS
Atom
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

 

Create XML Child Nodes with Attributes

How to create XML child nodes with attributes.

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


set xml = CreateObject("Chilkat.Xml")

'  The Chilkat XML component is freeware.

xml.Tag = "product"

Set xNode0 = xml.NewChild("properties","")

Set xChild = xNode0.NewChild("price","")
xChild.AddAttribute "SellPrice","11.99"

Set xChild = xNode0.NewChild("price","")
xChild.AddAttribute "BasePrice","11.99"

outFile.WriteLine(xml.GetXml())

'  Prints this:
'  <product>
'     <properties>
'         <price SellPrice="11.99"></price>
'         <price BasePrice="11.99"></price>
'     </properties>
' </product>


outFile.Close

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

© 2003-2007 Chilkat Software, Inc. All Rights Reserved.

Mail Component · XML Parser