Sample code for 30+ languages & platforms
Perl

Load XML from Local FilePath

Demonstrates how to load XML from a local XML file.

Chilkat Perl Downloads

Perl
use chilkat();

$success = 0;

$xml = chilkat::CkXml->new();

# 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) {
    print $xml->lastErrorText() . "\r\n";
    exit;
}

print "Success." . "\r\n";