Apterigo has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I am using the XML::Simple module to parse an XML file and input some fields into a database. Everything works well, except there is a section such as:
<DataContent> <head> <meta name="APU:IndustryCode" content="Banking / finance" /> <meta name="APU:IndustryCode" content="Joint ventures / investment" />
If I write code such as:
to read this, it only returns the second value (ie. Joint ventures / investment) and not the first value. I cannot find an easy to get both values. Any ideas?my $xs1 = XML::Simple->new(); $doc = $xs1->XMLin('./foo.xml'); $industrycode1 = $doc->{DataContent}->{head}->{meta}->{"APU:IndustryCo +de"}->{content};
Apterigo
|
---|
Replies are listed 'Best First'. | |
---|---|
Clobbered keys in XML::Simple
by Rhose (Priest) on Aug 29, 2002 at 17:45 UTC | |
Re: Clobbered keys in XML::Simple
by grantm (Parson) on Aug 29, 2002 at 20:51 UTC |
Back to
Seekers of Perl Wisdom