VBScript
VBScript
Load XML from Local FilePath
Demonstrates how to load XML from a local XML file.Chilkat VBScript Downloads
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)
success = 0
set xml = CreateObject("Chilkat.Xml")
' Pass either an absolute file path, or a file path relative from the current working directory of the caller.
success = xml.LoadXmlFile("qa_data/hamlet.xml")
If (success = 0) Then
outFile.WriteLine(xml.LastErrorText)
WScript.Quit
End If
outFile.WriteLine("Success.")
outFile.Close