Hi!,
I wrote the following script to extract information from a XML file (It's
probably poorly written as I'm not a programmer...). The Perl script works well.
I'm using the Perl Packager to convert the script into .exe (pp -o x.exe x.pl)
and the executable returns the following message:
Can't locate object method "new" via package "XML::SAX::PurePerl" at
XML/SAX/ParserFactory.pm at line43
I've installed the latest version of XML::SIMPLE, XML::SAX... with Perl 5.8.7
buid 813
I'm stumped .. Any idea is more than welcolme :)
Thanks!
David
use strict;
use XML::Simple;
my $recipe;
my $layer;
my $serial;
my $device;
my $last_modified;
my $xml;
my $config1;
$xml = new XML::Simple;
$config1 = $xml-> XMLin("Recipe.xml");
#1 Serial_Number
$serial = $config1
->{RECIPE}->{VERSION_DATA}->{MACHINE_SERIAL_NO}->{content};
#2 Recipe name
$recipe = $config1 ->{RECIPE}->{LAYER_ID}->{content};
#3 DEVICE_ID
$device =$config1 ->{RECIPE}->{DEVICE_ID}->{content};
#4 LAYER_ID
$layer = $config1 ->{RECIPE}->{LAYER_ID}->{content};
#5 LAST_MODIFIED_TIME
$last_modified=$config1 ->{RECIPE}->{LAST_MODIFIED_TIME}->{content};
print "Tool serial number: $serial \n";
print "Recipe name: $recipe \n";
print "Last modification time: $last_modified \n";
print "Device: $device \n";
print "Layer: $layer \n";
---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez le ici !