#!/usr/bin/perl
# use module
use XML::Simple;
use Data::Dumper;
print "Content-type: text/html\n\n";
# create object
$xml = XML::Simple->new();
print "Object Created
";
# read XML file
#$fh = IO::File->new('http://www.q.hpixml.com/servlet/HpiGate1_0?forward=YES&efxid=0503506&password=testing&initials=mk&function=SEARCH&vrm=fp08rou&XML=YES&product=HPI11&devicetype=XM');
$fh = "d:\\inetpub\\wwwroot\\cgi-bin\\classads\\testxmlfile.xml";
print "$fh
";
$data = $xml->XMLin('testxmlfile.xml');
print "File read
";
# print output
print Dumper($data);
print "done!!";
####
000001
HPI11
16/05/08
1
FP08ROU
Diesel
5 Speed Manual Diesel
5942518
5 Door Hatchback
D
01910
14
N0
2
5 Door Hatchback
N
5 Door Hatchback
WHITE
422
F
ZAR93700003421796
2 Axle Rigid Body
C
2008
No
00
0
000
16/05/2008
Recorded
Not Recorded
0
0
0
0
0
0
Not Matched
10120609455564
Mon Dec 6 2010 09:45:48