Sample code for 30+ languages & platforms
VBScript

Setting XML Tag and Content

See more XML Examples

Demonstrates how to set the tag and content of an XML node.

The following XML sample code produces this output:


<abc>123</abc>

Chilkat VBScript Downloads

VBScript
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)

set xml = CreateObject("Chilkat.Xml")

xml.Tag = "abc"
xml.Content = "123"

outFile.WriteLine(xml.GetXml())

outFile.Close