Sample code for 30+ languages & platforms
Tcl

Load XML from Local FilePath

Demonstrates how to load XML from a local XML file.

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set success 0

set xml [new_CkXml]

# Pass either an absolute file path, or a file path relative from the current working directory of the caller.
set success [CkXml_LoadXmlFile $xml "qa_data/hamlet.xml"]
if {$success == 0} then {
    puts [CkXml_lastErrorText $xml]
    delete_CkXml $xml
    exit
}

puts "Success."

delete_CkXml $xml