Folks, 

I am using XML::Simple to let me parse a config file. I include copies of
the code and the XML file in question.

My question is how to get at the Project name values, in a list or as the
keys to a hash.

I have tried perldoc perlref, which has not helped me.

Can anyone:

a) show me how to get this working
b) point me to a "Janet & John" type explanation of references


TIA

Rod the IFFO




=======XML=============
<?xml version="1.0" standalone="yes"?>

<MTOConfig>
<Project name="L3847" Schema="NONE">
<Rmk>Transfer from Elsewhere</Rmk>
</Project>
<Project name="EP1002" Schema="NONE">
<Rmk>Transfer from Elsewhere</Rmk>
</Project>
</MTOConfig>

========Code==============

use strict;
use warnings;

use XML::Simple;
use Data::Dumper;

my $config = XMLin();

print Dumper($config);

my %ProjList = $config->{Project}->{name};


foreach my $key (keys %ProjList) {
        print $ProjList{$_};
        }
        
my $ConveroRmk = $config->{Project}->{EP1002}->{Rmk};
print $ConveroRmk;


Rod CROWDER

Mailto:[EMAIL PROTECTED]
Tel: +44-1293-584145
Mob: +44-7711-553080
Fax: +44-1293-584994
 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to