in reply to XML::Simple - storing/retrieving 2 tables into 1 XML file

use XML::Simple; my $xml = new XML::Simple; my $data = $xml->XMLin("testing.xml"); foreach my $e (@{$data}) { my $p; if ($p=$e->{Phones}) { print "\n$p->{Manufacturer}"; print "\n$p->{Model}"; print "\n$p->{Version}"; print "\n$p->{Count}"; print "\n==========================="; } }
It works.

Replies are listed 'Best First'.
Re^2: XML::Simple - storing/retrieving 2 tables into 1 XML file
by kubrat (Scribe) on Sep 11, 2008 at 16:56 UTC
    Not surprised. As someone already suggested use Data::Dumper to understand the differences in the data structures ($data). The 2 versions of the XML document are not same, so it is only natural that the data structures generated will not be the same either.