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

Chilkat2 Perl
use strict;
use warnings;
use Chilkat2;

my $xml = Chilkat2::Xml->new;

# Pass either an absolute file path, or a file path relative from the current working directory of the caller.
my $success = $xml->LoadXmlFile('qa_data/hamlet.xml');
if (!$success) {
    print $xml->LastErrorText, "\n";
    exit;
}

print "Success.\n";